From: Luiz Augusto von Dentz <noreply@github.com>
To: linux-bluetooth@vger.kernel.org
Subject: [bluez/bluez] 323d54: shared/hci: Add BPF filter for registered events
Date: Fri, 01 May 2026 08:06:38 -0700 [thread overview]
Message-ID: <bluez/bluez/push/refs/heads/1088547/000000-dfbc31@github.com> (raw)
Branch: refs/heads/1088547
Home: https://github.com/bluez/bluez
Commit: 323d54f958ff446ecd6897c8ce1aade29639e454
https://github.com/bluez/bluez/commit/323d54f958ff446ecd6897c8ce1aade29639e454
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-05-01 (Fri, 01 May 2026)
Changed paths:
M src/shared/hci.c
Log Message:
-----------
shared/hci: Add BPF filter for registered events
Implement a BPF socket filter in bt_hci_register/bt_hci_unregister that
uses setsockopt(SO_ATTACH_FILTER) to only accept HCI events that have
been registered, plus BT_HCI_EVT_CMD_COMPLETE and BT_HCI_EVT_CMD_STATUS
which are always needed for command response processing.
The filter is rebuilt each time an event is registered or unregistered,
and only applies to non-stream (raw socket) connections.
Assisted-by: Claude:claude-opus-4.6
Commit: 445437b236ab5b3c7b9c888ae1baa52176216928
https://github.com/bluez/bluez/commit/445437b236ab5b3c7b9c888ae1baa52176216928
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-05-01 (Fri, 01 May 2026)
Changed paths:
M src/shared/hci.c
M src/shared/hci.h
Log Message:
-----------
shared/hci: Add bt_hci_register_subevent for LE Meta events
Add bt_hci_register_subevent/bt_hci_unregister_subevent API that allows
registering for specific LE Meta Event subevents. The BPF filter is
extended to accept BT_HCI_EVT_LE_META_EVENT packets and then check the
subevent byte (offset 4) against registered subevents.
Since bt_hci_register_subevent is only used with BT_HCI_EVT_LE_META_EVENT,
the event parameter is omitted. The subevent list reuses struct evt where
evt->event stores the subevent code.
Assisted-by: Claude:claude-opus-4.6
Commit: 5b1e05389d250781fbfd1e72308395b297f9414a
https://github.com/bluez/bluez/commit/5b1e05389d250781fbfd1e72308395b297f9414a
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-05-01 (Fri, 01 May 2026)
Changed paths:
M profiles/ranging/rap_hci.c
Log Message:
-----------
ranging/rap_hci: Use bt_hci_register_subevent for LE CS events
Replace the single BT_HCI_EVT_LE_META_EVENT registration and subevent
dispatch table with individual bt_hci_register_subevent calls for each
CS subevent. This enables BPF filtering at the socket level for each
specific subevent and removes the manual subevent dispatch logic.
Event IDs are stored in a struct queue for flexible management.
Assisted-by: Claude:claude-opus-4.6
Commit: dfbc31a733555c70ff0c6e74ba1834908485a950
https://github.com/bluez/bluez/commit/dfbc31a733555c70ff0c6e74ba1834908485a950
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-05-01 (Fri, 01 May 2026)
Changed paths:
M tools/hci-tester.c
Log Message:
-----------
hci-tester: Use bt_hci_register_subevent for LE Meta events
Convert all bt_hci_register(BT_HCI_EVT_LE_META_EVENT) calls to use
bt_hci_register_subevent with the specific subevent code. Update
callbacks to work with data that no longer contains the subevent byte
prefix, since bt_hci_register_subevent strips it before dispatch.
Assisted-by: Claude:claude-opus-4.6
Compare: https://github.com/bluez/bluez/compare/323d54f958ff%5E...dfbc31a73355
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
reply other threads:[~2026-05-01 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=bluez/bluez/push/refs/heads/1088547/000000-dfbc31@github.com \
--to=noreply@github.com \
--cc=linux-bluetooth@vger.kernel.org \
/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