Repository navigation
HID: dockchannel: bound empty GET_REPORT response buffers - #33
Merged
Merged
Conversation
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
force-pushed
the
fix/j700-dockchannel-zero-payload-ack
branch
from
September 26, 2026 12:37
f20ecac to
ff8eb61
Compare
RyanTheTide
marked this pull request as ready for review
September 26, 2026 12:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 introducedthe 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 --strictclean;dockchannel-hid.obuilt withW=1 C=1(sparse) on theJ700 configuration at this commit.
🤖 Generated with Claude Code