* [PATCH v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO
@ 2025-08-20 14:58 Luiz Augusto von Dentz
2025-08-20 15:36 ` [v1] " bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2025-08-20 14:58 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The debug UUID was only getting set if MGMT_OP_READ_EXP_FEATURES_INFO
was not called with a specific index which breaks the likes of
bluetoothd since it only invokes MGMT_OP_READ_EXP_FEATURES_INFO when an
adapter is plugged, so instead of depending hdev not to be set just
enable the UUID on any index like it was done with iso_sock_uuid.
Fixes: e625e50ceee1 ("Bluetooth: Introduce debug feature when dynamic debug is disabled")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/mgmt.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 3166f5fb876b..2db93b70e07f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -4413,13 +4413,11 @@ static int read_controller_cap(struct sock *sk, struct hci_dev *hdev,
rp, sizeof(*rp) + cap_len);
}
-#ifdef CONFIG_BT_FEATURE_DEBUG
/* d4992530-b9ec-469f-ab01-6c481c47da1c */
static const u8 debug_uuid[16] = {
0x1c, 0xda, 0x47, 0x1c, 0x48, 0x6c, 0x01, 0xab,
0x9f, 0x46, 0xec, 0xb9, 0x30, 0x25, 0x99, 0xd4,
};
-#endif
/* 330859bc-7506-492d-9370-9a6f0614037f */
static const u8 quality_report_uuid[16] = {
@@ -4468,15 +4466,13 @@ static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev,
if (!rp)
return -ENOMEM;
-#ifdef CONFIG_BT_FEATURE_DEBUG
- if (!hdev) {
+ if (IS_ENABLED(CONFIG_BT_FEATURE_DEBUG)) {
flags = bt_dbg_get() ? BIT(0) : 0;
memcpy(rp->features[idx].uuid, debug_uuid, 16);
rp->features[idx].flags = cpu_to_le32(flags);
idx++;
}
-#endif
if (hdev && hci_dev_le_state_simultaneous(hdev)) {
if (hci_dev_test_flag(hdev, HCI_LE_SIMULTANEOUS_ROLES))
--
2.50.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* RE: [v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO
2025-08-20 14:58 [PATCH v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO Luiz Augusto von Dentz
@ 2025-08-20 15:36 ` bluez.test.bot
2025-08-20 15:44 ` [PATCH v1] " Paul Menzel
2025-08-20 18:31 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-08-20 15:36 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 2456 bytes --]
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=993567
---Test result---
Test Summary:
CheckPatch PENDING 0.42 seconds
GitLint PENDING 0.31 seconds
SubjectPrefix PASS 0.11 seconds
BuildKernel PASS 24.35 seconds
CheckAllWarning PASS 26.98 seconds
CheckSparse PASS 30.31 seconds
BuildKernel32 PASS 24.15 seconds
TestRunnerSetup PASS 478.89 seconds
TestRunner_l2cap-tester PASS 25.08 seconds
TestRunner_iso-tester PASS 39.18 seconds
TestRunner_bnep-tester PASS 6.01 seconds
TestRunner_mgmt-tester FAIL 126.40 seconds
TestRunner_rfcomm-tester PASS 9.57 seconds
TestRunner_sco-tester PASS 14.89 seconds
TestRunner_ioctl-tester PASS 10.18 seconds
TestRunner_mesh-tester FAIL 11.45 seconds
TestRunner_smp-tester PASS 8.66 seconds
TestRunner_userchan-tester PASS 6.29 seconds
IncrementalBuild PENDING 1.05 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 483 (98.6%), Failed: 3, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.103 seconds
LL Privacy - Add Device 3 (AL is full) Failed 0.228 seconds
LL Privacy - Set Flags 3 (2 Devices to RL) Failed 0.191 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 1.979 seconds
Mesh - Send cancel - 2 Timed out 1.999 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO
2025-08-20 14:58 [PATCH v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO Luiz Augusto von Dentz
2025-08-20 15:36 ` [v1] " bluez.test.bot
@ 2025-08-20 15:44 ` Paul Menzel
2025-08-20 18:31 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: Paul Menzel @ 2025-08-20 15:44 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Dear Luiz,
Thank you for the patch.
Am 20.08.25 um 16:58 schrieb Luiz Augusto von Dentz:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> The debug UUID was only getting set if MGMT_OP_READ_EXP_FEATURES_INFO
> was not called with a specific index which breaks the likes of
> bluetoothd since it only invokes MGMT_OP_READ_EXP_FEATURES_INFO when an
> adapter is plugged, so instead of depending hdev not to be set just
> enable the UUID on any index like it was done with iso_sock_uuid.
>
> Fixes: e625e50ceee1 ("Bluetooth: Introduce debug feature when dynamic debug is disabled")
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> ---
> net/bluetooth/mgmt.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 3166f5fb876b..2db93b70e07f 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -4413,13 +4413,11 @@ static int read_controller_cap(struct sock *sk, struct hci_dev *hdev,
> rp, sizeof(*rp) + cap_len);
> }
>
> -#ifdef CONFIG_BT_FEATURE_DEBUG
> /* d4992530-b9ec-469f-ab01-6c481c47da1c */
> static const u8 debug_uuid[16] = {
> 0x1c, 0xda, 0x47, 0x1c, 0x48, 0x6c, 0x01, 0xab,
> 0x9f, 0x46, 0xec, 0xb9, 0x30, 0x25, 0x99, 0xd4,
> };
> -#endif
>
> /* 330859bc-7506-492d-9370-9a6f0614037f */
> static const u8 quality_report_uuid[16] = {
> @@ -4468,15 +4466,13 @@ static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev,
> if (!rp)
> return -ENOMEM;
>
> -#ifdef CONFIG_BT_FEATURE_DEBUG
> - if (!hdev) {
> + if (IS_ENABLED(CONFIG_BT_FEATURE_DEBUG)) {
> flags = bt_dbg_get() ? BIT(0) : 0;
>
> memcpy(rp->features[idx].uuid, debug_uuid, 16);
> rp->features[idx].flags = cpu_to_le32(flags);
> idx++;
> }
> -#endif
>
> if (hdev && hci_dev_le_state_simultaneous(hdev)) {
> if (hci_dev_test_flag(hdev, HCI_LE_SIMULTANEOUS_ROLES))
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO
2025-08-20 14:58 [PATCH v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO Luiz Augusto von Dentz
2025-08-20 15:36 ` [v1] " bluez.test.bot
2025-08-20 15:44 ` [PATCH v1] " Paul Menzel
@ 2025-08-20 18:31 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2025-08-20 18:31 UTC (permalink / raw)
To: Luiz Augusto von Dentz, linux-bluetooth; +Cc: oe-kbuild-all
Hi Luiz,
kernel test robot noticed the following build errors:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on bluetooth/master linus/master v6.17-rc2 next-20250820]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Luiz-Augusto-von-Dentz/Bluetooth-MGMT-Fix-not-exposing-debug-UUID-on-MGMT_OP_READ_EXP_FEATURES_INFO/20250820-230851
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
patch link: https://lore.kernel.org/r/20250820145829.1766185-1-luiz.dentz%40gmail.com
patch subject: [PATCH v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO
config: csky-randconfig-001-20250821 (https://download.01.org/0day-ci/archive/20250821/202508210258.dagzqWcm-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250821/202508210258.dagzqWcm-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508210258.dagzqWcm-lkp@intel.com/
All errors (new ones prefixed by >>):
net/bluetooth/mgmt.c: In function 'read_exp_features_info':
>> net/bluetooth/mgmt.c:4470:25: error: implicit declaration of function 'bt_dbg_get' [-Werror=implicit-function-declaration]
4470 | flags = bt_dbg_get() ? BIT(0) : 0;
| ^~~~~~~~~~
cc1: some warnings being treated as errors
vim +/bt_dbg_get +4470 net/bluetooth/mgmt.c
af6bcc1921ff0b Brian Gix 2022-09-01 4451
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4452 static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev,
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4453 void *data, u16 data_len)
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4454 {
af6bcc1921ff0b Brian Gix 2022-09-01 4455 struct mgmt_rp_read_exp_features_info *rp;
af6bcc1921ff0b Brian Gix 2022-09-01 4456 size_t len;
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4457 u16 idx = 0;
15d8ce05ebec37 Alain Michaud 2020-07-07 4458 u32 flags;
af6bcc1921ff0b Brian Gix 2022-09-01 4459 int status;
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4460
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4461 bt_dev_dbg(hdev, "sock %p", sk);
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4462
af6bcc1921ff0b Brian Gix 2022-09-01 4463 /* Enough space for 7 features */
af6bcc1921ff0b Brian Gix 2022-09-01 4464 len = sizeof(*rp) + (sizeof(rp->features[0]) * 7);
bb20da18ce936a Yihao Han 2022-09-19 4465 rp = kzalloc(len, GFP_KERNEL);
af6bcc1921ff0b Brian Gix 2022-09-01 4466 if (!rp)
af6bcc1921ff0b Brian Gix 2022-09-01 4467 return -ENOMEM;
af6bcc1921ff0b Brian Gix 2022-09-01 4468
50912f8b707c67 Luiz Augusto von Dentz 2025-08-20 4469 if (IS_ENABLED(CONFIG_BT_FEATURE_DEBUG)) {
15d8ce05ebec37 Alain Michaud 2020-07-07 @4470 flags = bt_dbg_get() ? BIT(0) : 0;
e625e50ceee18b Marcel Holtmann 2020-05-06 4471
e625e50ceee18b Marcel Holtmann 2020-05-06 4472 memcpy(rp->features[idx].uuid, debug_uuid, 16);
e625e50ceee18b Marcel Holtmann 2020-05-06 4473 rp->features[idx].flags = cpu_to_le32(flags);
e625e50ceee18b Marcel Holtmann 2020-05-06 4474 idx++;
e625e50ceee18b Marcel Holtmann 2020-05-06 4475 }
e625e50ceee18b Marcel Holtmann 2020-05-06 4476
76d0685bbac8ae Luiz Augusto von Dentz 2021-12-22 4477 if (hdev && hci_dev_le_state_simultaneous(hdev)) {
76d0685bbac8ae Luiz Augusto von Dentz 2021-12-22 4478 if (hci_dev_test_flag(hdev, HCI_LE_SIMULTANEOUS_ROLES))
15d8ce05ebec37 Alain Michaud 2020-07-07 4479 flags = BIT(0);
15d8ce05ebec37 Alain Michaud 2020-07-07 4480 else
15d8ce05ebec37 Alain Michaud 2020-07-07 4481 flags = 0;
15d8ce05ebec37 Alain Michaud 2020-07-07 4482
76d0685bbac8ae Luiz Augusto von Dentz 2021-12-22 4483 memcpy(rp->features[idx].uuid, le_simultaneous_roles_uuid, 16);
15d8ce05ebec37 Alain Michaud 2020-07-07 4484 rp->features[idx].flags = cpu_to_le32(flags);
15d8ce05ebec37 Alain Michaud 2020-07-07 4485 idx++;
15d8ce05ebec37 Alain Michaud 2020-07-07 4486 }
15d8ce05ebec37 Alain Michaud 2020-07-07 4487
258f56d11bbbf3 Joseph Hwang 2021-11-02 4488 if (hdev && (aosp_has_quality_report(hdev) ||
258f56d11bbbf3 Joseph Hwang 2021-11-02 4489 hdev->set_quality_report)) {
ae7d925b5c0432 Joseph Hwang 2021-08-15 4490 if (hci_dev_test_flag(hdev, HCI_QUALITY_REPORT))
823f3bc4e2eca7 Marcel Holtmann 2021-09-28 4491 flags = BIT(0);
823f3bc4e2eca7 Marcel Holtmann 2021-09-28 4492 else
ae7d925b5c0432 Joseph Hwang 2021-08-15 4493 flags = 0;
823f3bc4e2eca7 Marcel Holtmann 2021-09-28 4494
ae7d925b5c0432 Joseph Hwang 2021-08-15 4495 memcpy(rp->features[idx].uuid, quality_report_uuid, 16);
ae7d925b5c0432 Joseph Hwang 2021-08-15 4496 rp->features[idx].flags = cpu_to_le32(flags);
ae7d925b5c0432 Joseph Hwang 2021-08-15 4497 idx++;
ae7d925b5c0432 Joseph Hwang 2021-08-15 4498 }
ae7d925b5c0432 Joseph Hwang 2021-08-15 4499
7f7fd17ed7c522 Marcel Holtmann 2021-09-28 4500 if (hdev && hdev->get_data_path_id) {
ad933151832855 Kiran K 2021-09-07 4501 if (hci_dev_test_flag(hdev, HCI_OFFLOAD_CODECS_ENABLED))
7f7fd17ed7c522 Marcel Holtmann 2021-09-28 4502 flags = BIT(0);
7f7fd17ed7c522 Marcel Holtmann 2021-09-28 4503 else
ad933151832855 Kiran K 2021-09-07 4504 flags = 0;
7f7fd17ed7c522 Marcel Holtmann 2021-09-28 4505
ad933151832855 Kiran K 2021-09-07 4506 memcpy(rp->features[idx].uuid, offload_codecs_uuid, 16);
ad933151832855 Kiran K 2021-09-07 4507 rp->features[idx].flags = cpu_to_le32(flags);
ad933151832855 Kiran K 2021-09-07 4508 idx++;
ad933151832855 Kiran K 2021-09-07 4509 }
ad933151832855 Kiran K 2021-09-07 4510
ccf74f2390d60a Luiz Augusto von Dentz 2020-01-16 4511 if (IS_ENABLED(CONFIG_BT_LE)) {
3ca23aaba210e4 Luiz Augusto von Dentz 2025-08-04 4512 flags = iso_inited() ? BIT(0) : 0;
ccf74f2390d60a Luiz Augusto von Dentz 2020-01-16 4513 memcpy(rp->features[idx].uuid, iso_socket_uuid, 16);
ccf74f2390d60a Luiz Augusto von Dentz 2020-01-16 4514 rp->features[idx].flags = cpu_to_le32(flags);
ccf74f2390d60a Luiz Augusto von Dentz 2020-01-16 4515 idx++;
ccf74f2390d60a Luiz Augusto von Dentz 2020-01-16 4516 }
ccf74f2390d60a Luiz Augusto von Dentz 2020-01-16 4517
af6bcc1921ff0b Brian Gix 2022-09-01 4518 if (hdev && lmp_le_capable(hdev)) {
af6bcc1921ff0b Brian Gix 2022-09-01 4519 if (hci_dev_test_flag(hdev, HCI_MESH_EXPERIMENTAL))
af6bcc1921ff0b Brian Gix 2022-09-01 4520 flags = BIT(0);
af6bcc1921ff0b Brian Gix 2022-09-01 4521 else
af6bcc1921ff0b Brian Gix 2022-09-01 4522 flags = 0;
af6bcc1921ff0b Brian Gix 2022-09-01 4523
af6bcc1921ff0b Brian Gix 2022-09-01 4524 memcpy(rp->features[idx].uuid, mgmt_mesh_uuid, 16);
af6bcc1921ff0b Brian Gix 2022-09-01 4525 rp->features[idx].flags = cpu_to_le32(flags);
af6bcc1921ff0b Brian Gix 2022-09-01 4526 idx++;
af6bcc1921ff0b Brian Gix 2022-09-01 4527 }
af6bcc1921ff0b Brian Gix 2022-09-01 4528
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4529 rp->feature_count = cpu_to_le16(idx);
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4530
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4531 /* After reading the experimental features information, enable
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4532 * the events to update client on any future change.
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4533 */
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4534 hci_sock_set_flag(sk, HCI_MGMT_EXP_FEATURE_EVENTS);
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4535
af6bcc1921ff0b Brian Gix 2022-09-01 4536 status = mgmt_cmd_complete(sk, hdev ? hdev->id : MGMT_INDEX_NONE,
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4537 MGMT_OP_READ_EXP_FEATURES_INFO,
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4538 0, rp, sizeof(*rp) + (20 * idx));
af6bcc1921ff0b Brian Gix 2022-09-01 4539
af6bcc1921ff0b Brian Gix 2022-09-01 4540 kfree(rp);
af6bcc1921ff0b Brian Gix 2022-09-01 4541 return status;
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4542 }
a10c907ce0e5e1 Marcel Holtmann 2020-05-06 4543
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-20 18:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 14:58 [PATCH v1] Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO Luiz Augusto von Dentz
2025-08-20 15:36 ` [v1] " bluez.test.bot
2025-08-20 15:44 ` [PATCH v1] " Paul Menzel
2025-08-20 18:31 ` kernel test robot
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.