Skip to content

HID: dockchannel: bound empty GET_REPORT response buffers - #33

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
fix/j700-dockchannel-zero-payload-ack
Sep 26, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
fix/j700-dockchannel-zero-payload-ack

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

HID: dockchannel: bound empty GET_REPORT response buffers

Same one-hunk fix as the audited head f20ecac7d16e, re-committed with the
project identity: author, committer and Signed-off-by are Ryan Murray <[email protected]>
(the draft carried the GitHub noreply address), a Fixes: tag on the PR #27 patch that introduced
the response-length accounting (e945dcb), and the message rewritten to state precisely which
caller can reach the zero-capacity case and what was run on the machine. The code change is
byte-identical to the draft.

Hardware. Carried in every J700 qualification candidate of 2026-09-26 (aurora-wip 9225703 +
#33 + #34, candidates 2 through 8d): keyboard and trackpad operator-confirmed, no DockChannel HID
errors in the boot logs. The one-byte GET_REPORT request itself was not exercised.

Checks. checkpatch --strict clean; dockchannel-hid.o built with W=1 C=1 (sparse) on the
J700 configuration at this commit.

🤖 Generated with Claude Code

The HID core accepts a GET_REPORT request whose buffer holds only the
report ID (hid_hw_raw_request() requires len >= 1), which reaches
dchid_raw_request() with room for the ID and nothing else, so
dchid_cmd() is given a response buffer of size zero. The ACK handler
treated a zero-capacity buffer like the SET_REPORT case, which has no
buffer at all, and returned the firmware's full ACK length although
nothing beyond the ID had been delivered: the caller was told about
bytes that were never copied.

Take the GET_REPORT path whenever a response pointer is present: copy
nothing when there is no room, and report one byte, the report ID.

Carried in every J700 qualification candidate of 2026-09-26, from
aurora-wip 9225703 + this + the USB DART enable onwards: keyboard and
trackpad confirmed by the operator across the candidates, no DockChannel
HID errors in the boot logs. The one-byte request itself was not
exercised on the machine.

Fixes: e945dcb ("HID: dockchannel: Return only the bytes copied into a GET_REPORT buffer")
Assisted-by: LLM checkpatch sparse
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide force-pushed the fix/j700-dockchannel-zero-payload-ack branch from f20ecac to ff8eb61 Compare September 26, 2026 12:37
@RyanTheTide RyanTheTide changed the title HID: dockchannel: Bound empty GET_REPORT response buffers HID: dockchannel: bound empty GET_REPORT response buffers Sep 26, 2026
@RyanTheTide
RyanTheTide marked this pull request as ready for review September 26, 2026 12:37
@RyanTheTide
RyanTheTide merged commit c301767 into aurora-wip Sep 26, 2026
@RyanTheTide
RyanTheTide deleted the fix/j700-dockchannel-zero-payload-ack branch September 26, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant