Message ID | 20250320153415.1391223-1-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v1] Bluetooth: hci_event: Fix handling of HCI_EV_LE_DIRECT_ADV_REPORT | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=945967 ---Test result--- Test Summary: CheckPatch PENDING 0.40 seconds GitLint PENDING 0.24 seconds SubjectPrefix PASS 0.33 seconds BuildKernel PASS 24.11 seconds CheckAllWarning PASS 26.56 seconds CheckSparse WARNING 29.91 seconds BuildKernel32 PASS 23.76 seconds TestRunnerSetup PASS 427.11 seconds TestRunner_l2cap-tester FAIL 21.16 seconds TestRunner_iso-tester FAIL 32.37 seconds TestRunner_bnep-tester PASS 4.61 seconds TestRunner_mgmt-tester PASS 120.14 seconds TestRunner_rfcomm-tester PASS 7.72 seconds TestRunner_sco-tester FAIL 14.97 seconds TestRunner_ioctl-tester PASS 13.77 seconds TestRunner_mesh-tester FAIL 6.13 seconds TestRunner_smp-tester PASS 7.03 seconds TestRunner_userchan-tester PASS 4.88 seconds IncrementalBuild PENDING 1.02 seconds Details ############################## Test: CheckPatch - PENDING Desc: Run checkpatch.pl script Output: ############################## Test: GitLint - PENDING Desc: Run gitlint Output: ############################## Test: CheckSparse - WARNING Desc: Run sparse tool with linux kernel Output: net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h): ############################## Test: TestRunner_l2cap-tester - FAIL Desc: Run l2cap-tester with test-runner Output: Total: 62, Passed: 59 (95.2%), Failed: 3, Not Run: 0 Failed Test Cases L2CAP BR/EDR Client - TX Timestamping Failed 0.118 seconds L2CAP BR/EDR Client - Stream TX Timestamping Failed 0.115 seconds L2CAP LE Client - TX Timestamping Failed 0.106 seconds ############################## Test: TestRunner_iso-tester - FAIL Desc: Run iso-tester with test-runner Output: Total: 124, Passed: 121 (97.6%), Failed: 2, Not Run: 1 Failed Test Cases ISO Send - TX Timestamping Failed 0.200 seconds ISO Send - TX CMSG Timestamping Timed out 1.880 seconds ############################## Test: TestRunner_sco-tester - FAIL Desc: Run sco-tester with test-runner Output: Total: 20, Passed: 18 (90.0%), Failed: 2, Not Run: 0 Failed Test Cases SCO CVSD Send - TX Timestamping Failed 0.166 seconds SCO CVSD Send No Flowctl - TX Timestamping Timed out 2.480 seconds ############################## Test: TestRunner_mesh-tester - FAIL Desc: Run mesh-tester with test-runner Output: BUG: KASAN: slab-use-after-free in run_timer_softirq+0x76f/0x7d0 WARNING: CPU: 0 PID: 66 at kernel/workqueue.c:2257 __queue_work+0x93e/0xba0 Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0 Failed Test Cases Mesh - Send cancel - 1 Failed 0.112 seconds ############################## Test: IncrementalBuild - PENDING Desc: Incremental build with the patches in the series Output: --- Regards, Linux Bluetooth
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Thu, 20 Mar 2025 11:34:14 -0400 you wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > Some controllers seems to generate HCI_EV_LE_DIRECT_ADV_REPORT even when > scan_filter is not set to 0x02 or 0x03, which indicates that local > privacy is enabled, causing them to be ignored thus breaking > auto-connect logic: > > [...] Here is the summary with links: - [v1] Bluetooth: hci_event: Fix handling of HCI_EV_LE_DIRECT_ADV_REPORT https://git.kernel.org/bluetooth/bluetooth-next/c/a37df2815c1b You are awesome, thank you!
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 0df4a0e082c8..01d8c11c2c7e 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -6056,8 +6056,17 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr, * a LE Direct Advertising Report event. In that case it is * important to see if the address is matching the local * controller address. + * + * If local privacy is not enable the controller shall not be + * generating such event since according to its documentation it is only + * valid for filter_policy 0x02 and 0x03, but the fact that it did + * generate LE Direct Advertising Report means it is probably broken and + * won't generate any other event which can potentially break + * auto-connect logic so in case local privacy is not enable this + * ignores the direct_addr so it works as a regular report. */ - if (!hci_dev_test_flag(hdev, HCI_MESH) && direct_addr) { + if (!hci_dev_test_flag(hdev, HCI_MESH) && direct_addr && + hci_dev_test_flag(hdev, HCI_PRIVACY)) { direct_addr_type = ev_bdaddr_type(hdev, direct_addr_type, &bdaddr_resolved); @@ -6067,12 +6076,6 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr, if (!hci_bdaddr_is_rpa(direct_addr, direct_addr_type)) return; - /* If the controller is not using resolvable random - * addresses, then this report can be ignored. - */ - if (!hci_dev_test_flag(hdev, HCI_PRIVACY)) - return; - /* If the local IRK of the controller does not match * with the resolvable random address provided, then * this report can be ignored.