From: sashiko-bot@kernel.org
To: "Michael Reeves via B4 Relay"
<devnull+michael.reeves077.gmail.com@kernel.org>
Cc: dmitry.torokhov@gmail.com, devicetree@vger.kernel.org,
robh@kernel.org, linux-input@vger.kernel.org,
conor+dt@kernel.org
Subject: Re: [PATCH 07/10] HID: apple: Add support for DockChannel HID keyboards
Date: Tue, 30 Jun 2026 13:43:19 +0000 [thread overview]
Message-ID: <20260630134320.9A1271F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630-apple-mtp-keyboard-final-v1-7-506d936a1707@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The custom `apple_match` callback fails to check for the `HID_QUIRK_IGNORE_SPECIAL_DRIVER` quirk, bypassing system or BPF-driven overrides that force the generic HID driver.
--
commit 28e52ea5c163ab3459cd9d8d4a75ee76a37b6489
Author: Michael Reeves <michael.reeves077@gmail.com>
HID: apple: Add support for DockChannel HID keyboards
This commit registers DockChannel keyboards as host-bus Apple HID devices.
It updates hid-apple to match these devices, applies the Magic Keyboard
function-key table, and fixes their oversized report-size descriptors before
parsing.
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> index bf7dd0fbf2496..47c6ec09d5fae 100644
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
[ ... ]
> @@ -1003,6 +1035,17 @@ static void apple_remove(struct hid_device *hdev)
> hid_hw_stop(hdev);
> }
>
> +static bool apple_match(struct hid_device *hdev, bool ignore_special_driver)
> +{
> + if (ignore_special_driver)
> + return false;
> +
[Severity: Medium]
Does this custom match function bypass the HID_QUIRK_IGNORE_SPECIAL_DRIVER
quirk?
It checks the ignore_special_driver parameter, but it looks like it omits
checking if hdev->quirks has the HID_QUIRK_IGNORE_SPECIAL_DRIVER bit set.
By unconditionally returning true for standard Apple devices further down,
this might allow hid-apple to bind even when a user or BPF program explicitly
requested to ignore special drivers and use hid-generic instead.
Should this also check for (hdev->quirks & HID_QUIRK_IGNORE_SPECIAL_DRIVER)
before allowing the match?
> + if (hdev->group == HID_GROUP_APPLE_DOCKCHANNEL)
> + return apple_is_dockchannel_keyboard(hdev);
> +
> + return true;
> +}
> +
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260630-apple-mtp-keyboard-final-v1-0-506d936a1707@gmail.com?part=7
next prev parent reply other threads:[~2026-06-30 13:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 12:54 [PATCH 00/10] Add support for Apple Silicon DockChannel internal keyboards Michael Reeves via B4 Relay
2026-06-30 12:54 ` [PATCH 01/10] dt-bindings: mailbox: Add Apple t8122 ASC mailbox Michael Reeves via B4 Relay
2026-06-30 17:05 ` Conor Dooley
2026-06-30 12:54 ` [PATCH 02/10] dt-bindings: mailbox: apple: Add DockChannel mailbox Michael Reeves via B4 Relay
2026-06-30 17:07 ` Conor Dooley
2026-07-01 14:35 ` Michael Reeves
2026-06-30 12:54 ` [PATCH 03/10] dt-bindings: iommu: apple,dart: Add t8122 compatible Michael Reeves via B4 Relay
2026-06-30 17:07 ` Conor Dooley
2026-06-30 12:54 ` [PATCH 04/10] dt-bindings: input: apple: Add DockChannel HID transport Michael Reeves via B4 Relay
2026-06-30 13:10 ` sashiko-bot
2026-06-30 17:08 ` Conor Dooley
2026-07-01 14:36 ` Michael Reeves
2026-06-30 12:54 ` [PATCH 05/10] mailbox: apple: Add DockChannel FIFO controller Michael Reeves via B4 Relay
2026-06-30 12:54 ` [PATCH 06/10] soc: apple: rtkit: Add tracekit endpoint Michael Reeves via B4 Relay
2026-06-30 12:54 ` [PATCH 07/10] HID: apple: Add support for DockChannel HID keyboards Michael Reeves via B4 Relay
2026-06-30 13:41 ` Sasha Finkelstein
2026-07-01 14:01 ` Michael Reeves
2026-06-30 13:43 ` sashiko-bot [this message]
2026-06-30 12:54 ` [PATCH 08/10] HID: apple: Add DockChannel HID transport driver Michael Reeves via B4 Relay
2026-06-30 13:21 ` Yureka Lilian
2026-07-01 14:32 ` Michael Reeves
2026-06-30 13:58 ` sashiko-bot
2026-06-30 12:54 ` [PATCH 09/10] arm64: dts: apple: Add MTP DockChannel HID nodes Michael Reeves via B4 Relay
2026-06-30 12:54 ` [PATCH 10/10] arm64: dts: apple: Enable DockChannel HID on M2 and M3 laptops Michael Reeves via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260630134320.9A1271F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+michael.reeves077.gmail.com@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox