* [bluez/bluez] 88fd81: shared/hci: Add BPF filter for registered events
@ 2026-04-30 15:59 Luiz Augusto von Dentz
0 siblings, 0 replies; only message in thread
From: Luiz Augusto von Dentz @ 2026-04-30 15:59 UTC (permalink / raw)
To: linux-bluetooth
Branch: refs/heads/1088223
Home: https://github.com/bluez/bluez
Commit: 88fd81c365dee91d3eaf97945282539636baf809
https://github.com/bluez/bluez/commit/88fd81c365dee91d3eaf97945282539636baf809
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-04-30 (Thu, 30 Apr 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: 576c56e190179d7cbecfa5b879705a79e847debf
https://github.com/bluez/bluez/commit/576c56e190179d7cbecfa5b879705a79e847debf
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-04-30 (Thu, 30 Apr 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: e6772a47c743ba2a3a84480dbd06b94346cfa74a
https://github.com/bluez/bluez/commit/e6772a47c743ba2a3a84480dbd06b94346cfa74a
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-04-30 (Thu, 30 Apr 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
Compare: https://github.com/bluez/bluez/compare/88fd81c365de%5E...e6772a47c743
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-30 15:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 15:59 [bluez/bluez] 88fd81: shared/hci: Add BPF filter for registered events Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox