Repository navigation
feat(contrib): narrow the bolt receiver rule to the hid++ interface (#197) - #205
Merged
Merged
Conversation
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
Follow-up slice of the beta epic #180, from the security re-review of #196. The
046d:c548line ofcontrib/udev/70-keyvo.rulestagged every hidraw node of the Bolt receiver, one per USB interface. The owner's measurement in #187 (docs/hardware-notes.md, record D8) shows that the kernel runs the receiver without per-device nodes, so the paired devices share those interfaces:00carries what is typed on the MX Mechanical,01the MX Master 4's and the undiverted Dialpad's mouse reports,02HID++ only,03a digitizer. The rule now matches interface02as well, so only the HID++ node the Dialpad driver opens gets the ACL.Closes #197
Changes
contrib/udev/70-keyvo.rules: thec548line gainsATTRS{bInterfaceNumber}=="02", the onlyATTRSkey on the line (udev matches allATTRSkeys of a rule on one parent device); theIMPORT{parent}="HID_ID"match on the immediate HID parent stays. The comment says what the HID++ node carries according to D8 (HID++10/11only: nothing while undiverted, the Dialpad's0x1B04and0x4610reports while keyvo diverts them, no keyboard or mouse input), what the closed nodes carry, and that the HID++ node reaches every paired device. The old "to be measured" wording and the claim abouthid-logitech-djchild nodes, which D8 contradicts on the owner's host, are gone.crates/keyvo-core/tests/contrib.rs: the udev rule test pins the narrowed line exactly and still rejects any other line,MODE,GROUPand0666. It failed on the old rule before the change.SECURITY.md, the device access paragraph: which node stays open, what it carries and what the other three carry, from D8. One addition beyond the issue text: a process of the seat user can send any HID++ request to the keyboard and the mouse over that node (settings, diverts of their divertable controls), as Solaar does.docs/spec.md: §3 "As built (beta, chore(contrib,cli): systemd user unit, udev rule and keyvo doctor #184)" says the same, and there is a changelog entry.docs/hardware-notes.md: D8 "Settles" names the rule.README.md: the install bullet says "the Bolt receiver's HID++ node".docs/beta-test.md: section 5 has the block for this PR.Automated checks
just fmt-checkexit 0just lint(clippy,-D warnings) is cleanjust testpasses (756 passed, 1 skipped)just denypasses (advisories, bans, licenses, sources ok)contrib.rs)User test
These are the owner's items, on the host with the rule of this branch installed (
docs/beta-test.md, section 5, block for this PR).getfaclon each046d:c548hidraw node. Only the HID++ node (bInterfaceNumber02, reports10 11) lists the user.bin/keyvo dialruns as the user and prints events.Notes for reviewer
keyvo doctor'sruleline:keyvo doctorcompares the installed rule with the bundled one (doctor::RULE,include_str!). A host that still has the chore(contrib,cli): systemd user unit, udev rule and keyvo doctor (#184) #196 rule therefore readsrulewarnuntil the new rule is installed. The beta-test block installs it first.HID_IDmatch stays: it does nothing on the owner's host, where every receiver node has the receiver as its HID parent. It keeps per-device nodes closed where a kernel does create them.docs/beta-test.mdstill speaks of a keyboard "child node", which D8 shows does not exist on the owner's host. It is a ticked-or-not record of chore(contrib,cli): systemd user unit, udev rule and keyvo doctor (#184) #196, so I left it unchanged. The new block replaces it as the check of the receiver's nodes.