Repository navigation
Use the native Linux USB ABI and bound control transfers. - #86
Conversation
The fixed ioctl request encoded a 64-bit structure on 32-bit hosts, while buffer lengths and long deadlines could wrap before reaching usbfs. Derive the request size from the native structure, reject oversized buffers, and round and clamp the timeout without overflow. Pin the data through the synchronous ioctl so its integer address cannot outlive the backing storage.
PowerPC and MIPS encode ioctl directions differently from the generic Linux ABI. Native structure sizes alone leave interface and bulk requests using the wrong command numbers. Select the direction masks for the host and retain compile-time checks against the expected USB request numbers on both encoding families.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The HTML parser used on pull-request descriptions is affected by GO-2026-6860. Upgrade x/net to the fixed release and require Go 1.26.10 so the checker also avoids the affected Go 1.26.0 URL parser. Record the new minimum in the installation instructions.
|
@codex review |
c71a497 to
946a2a8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 946a2a8f6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Linux endpoint-zero control transfers now reject buffers above 65,535 bytes, retain pinned buffers through the ioctl, and derive the request size from the native control structure. Positive deadlines round up to milliseconds and clamp to the host timeout limit without overflow. Interface and bulk requests also use the host ioctl direction encoding, including PowerPC and MIPS.
The policy checker also updates its HTML parser to address GO-2026-6860. This raises the minimum Go version to 1.26.10.
Why
The fixed request encoded a 64-bit structure size on 32-bit hosts. Buffer lengths and long deadlines could also wrap before reaching usbfs. The request constant is now typed so the USB tests compile on 32-bit Linux. PowerPC and MIPS need different direction bits for interface and bulk requests as well; compile-time assertions check both encoding families against their expected command numbers.
Documentation
The Linux USB guide documents the buffer and timeout bounds and distinguishes ABI checks from physical architecture validation.
The README records the new minimum Go version.