All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Bluetooth: Miscellaneous fixes and cleanups
@ 2026-07-28  6:54 Zijun Hu
  2026-07-28  6:54 ` [PATCH v2 1/3] Bluetooth: btintel: Fix diagnostics event detection Zijun Hu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zijun Hu @ 2026-07-28  6:54 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, Abhishek Pandit-Subedi,
	Manish Mandlik, Chethan Tumkur Narayan
  Cc: Zijun Hu, Luiz Augusto von Dentz, linux-bluetooth, linux-kernel,
	Zijun Hu

This series has one bug fix and two cleanups, all very simple.

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
---
Changes in v2:
- Rework patch 1: guard with (@len + 1) against skb->len, per Luiz.
- Add two more btintel/coredump cleanups.
- Drop "hci_core: Don't treat HCI_DRV_PKT/HCI_DIAG_PKT as unknown type".
- Link to v1: https://patch.msgid.link/20260725-generic_fix-v1-0-305aec261a19@oss.qualcomm.com

---
Zijun Hu (3):
      Bluetooth: btintel: Fix diagnostics event detection
      Bluetooth: btintel: Remove redundant (hdr->plen > 0) in btintel_recv_event()
      Bluetooth: coredump: Expose header size and end marker to drivers

 drivers/bluetooth/btintel.c      | 5 ++---
 include/net/bluetooth/coredump.h | 7 +++++++
 net/bluetooth/coredump.c         | 7 ++-----
 3 files changed, 11 insertions(+), 8 deletions(-)
---
base-commit: a7ef68421906a8b1c4204dda9b2e52b90f6fd2ba
change-id: 20260724-generic_fix-6f13710b92ea

Best regards,
--  
Zijun Hu <zijun.hu@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 01/11] Bluetooth: btintel: Fix diagnostics event detection
@ 2026-07-25  8:54 Zijun Hu
  2026-07-25 10:52 ` Bluetooth: Miscellaneous fixes and cleanups bluez.test.bot
  0 siblings, 1 reply; 6+ messages in thread
From: Zijun Hu @ 2026-07-25  8:54 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, Abhishek Pandit-Subedi,
	Chethan Tumkur Narayan, Manish Mandlik
  Cc: Zijun Hu, Luiz Augusto von Dentz, linux-bluetooth, linux-kernel,
	Zijun Hu

For a diagnostics VSE, diagnostics_hdr[] sits at the start of the event
payload, skb->data[2], but btintel_recv_event() wrongly guards its
memcmp with @len, which is measured from skb->data[3] for the earlier
INTEL_BOOTLOADER check.

Fix by using @hdr->plen, which is the event payload length, instead.

Fixes: af395330abed ("Bluetooth: btintel: Add Intel devcoredump support")
Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
---
 drivers/bluetooth/btintel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 5e9cac090bd8..d7baf1b9d852 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -3826,17 +3826,17 @@ int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
 				kfree_skb(skb);
 				return 0;
 			}
 		}
 
 		/* Handle all diagnostics events separately. May still call
 		 * hci_recv_frame.
 		 */
-		if (len >= sizeof(diagnostics_hdr) &&
+		if (hdr->plen >= sizeof(diagnostics_hdr) &&
 		    memcmp(&skb->data[2], diagnostics_hdr,
 			   sizeof(diagnostics_hdr)) == 0) {
 			return btintel_diagnostics(hdev, skb);
 		}
 	}
 
 	return hci_recv_frame(hdev, skb);
 }

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-28  9:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28  6:54 [PATCH v2 0/3] Bluetooth: Miscellaneous fixes and cleanups Zijun Hu
2026-07-28  6:54 ` [PATCH v2 1/3] Bluetooth: btintel: Fix diagnostics event detection Zijun Hu
2026-07-28  9:29   ` Bluetooth: Miscellaneous fixes and cleanups bluez.test.bot
2026-07-28  6:54 ` [PATCH v2 2/3] Bluetooth: btintel: Remove redundant (hdr->plen > 0) in btintel_recv_event() Zijun Hu
2026-07-28  6:54 ` [PATCH v2 3/3] Bluetooth: coredump: Expose header size and end marker to drivers Zijun Hu
  -- strict thread matches above, loose matches on Subject: below --
2026-07-25  8:54 [PATCH 01/11] Bluetooth: btintel: Fix diagnostics event detection Zijun Hu
2026-07-25 10:52 ` Bluetooth: Miscellaneous fixes and cleanups bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.