All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH
@ 2023-08-18 21:22 Luiz Augusto von Dentz
  2023-08-18 21:53 ` bluez.test.bot
  2023-08-21 13:03 ` [PATCH] " kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2023-08-18 21:22 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

There a few instances still using HCI_MAX_AD_LENGTH instead of using
max_adv_len which takes care of detecting what is the actual maximum
length depending on if the controller supports EA or not.

Fixes: 112b5090c219 ("Bluetooth: MGMT: Fix always using HCI_MAX_AD_LENGTH")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 include/net/bluetooth/hci_core.h | 6 +++---
 net/bluetooth/eir.c              | 2 +-
 net/bluetooth/mgmt.c             | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 6fb055e3c595..6e2988b11f99 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -83,7 +83,7 @@ struct discovery_state {
 	u8			last_adv_addr_type;
 	s8			last_adv_rssi;
 	u32			last_adv_flags;
-	u8			last_adv_data[HCI_MAX_AD_LENGTH];
+	u8			last_adv_data[HCI_MAX_EXT_AD_LENGTH];
 	u8			last_adv_data_len;
 	bool			report_invalid_rssi;
 	bool			result_filtering;
@@ -290,7 +290,7 @@ struct adv_pattern {
 	__u8 ad_type;
 	__u8 offset;
 	__u8 length;
-	__u8 value[HCI_MAX_AD_LENGTH];
+	__u8 value[HCI_MAX_EXT_AD_LENGTH];
 };
 
 struct adv_rssi_thresholds {
@@ -726,7 +726,7 @@ struct hci_conn {
 	__u16		le_conn_interval;
 	__u16		le_conn_latency;
 	__u16		le_supv_timeout;
-	__u8		le_adv_data[HCI_MAX_AD_LENGTH];
+	__u8		le_adv_data[HCI_MAX_EXT_AD_LENGTH];
 	__u8		le_adv_data_len;
 	__u8		le_per_adv_data[HCI_MAX_PER_AD_LENGTH];
 	__u8		le_per_adv_data_len;
diff --git a/net/bluetooth/eir.c b/net/bluetooth/eir.c
index 8a85f6cdfbc1..0f66097b0693 100644
--- a/net/bluetooth/eir.c
+++ b/net/bluetooth/eir.c
@@ -33,7 +33,7 @@ u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
 	size_t complete_len;
 
 	/* no space left for name (+ NULL + type + len) */
-	if ((HCI_MAX_AD_LENGTH - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
+	if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
 		return ad_len;
 
 	/* use complete name if present and fits */
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index d6c9b7bc8592..ba2e00646e8e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5381,9 +5381,9 @@ static u8 parse_adv_monitor_pattern(struct adv_monitor *m, u8 pattern_count,
 	for (i = 0; i < pattern_count; i++) {
 		offset = patterns[i].offset;
 		length = patterns[i].length;
-		if (offset >= HCI_MAX_AD_LENGTH ||
-		    length > HCI_MAX_AD_LENGTH ||
-		    (offset + length) > HCI_MAX_AD_LENGTH)
+		if (offset >= HCI_MAX_EXT_AD_LENGTH ||
+		    length > HCI_MAX_EXT_AD_LENGTH ||
+		    (offset + length) > HCI_MAX_EXT_AD_LENGTH)
 			return MGMT_STATUS_INVALID_PARAMS;
 
 		p = kmalloc(sizeof(*p), GFP_KERNEL);
-- 
2.41.0


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

* RE: Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH
  2023-08-18 21:22 [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH Luiz Augusto von Dentz
@ 2023-08-18 21:53 ` bluez.test.bot
  2023-08-21 13:03 ` [PATCH] " kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-08-18 21:53 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 20008 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=777545

---Test result---

Test Summary:
CheckPatch                    PASS      1.18 seconds
GitLint                       PASS      0.34 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   FAIL      31.44 seconds
CheckAllWarning               FAIL      34.12 seconds
CheckSparse                   FAIL      38.40 seconds
CheckSmatch                   FAIL      98.00 seconds
BuildKernel32                 FAIL      30.00 seconds
TestRunnerSetup               FAIL      476.39 seconds
TestRunner_l2cap-tester       FAIL      0.16 seconds
TestRunner_iso-tester         FAIL      0.16 seconds
TestRunner_bnep-tester        FAIL      0.16 seconds
TestRunner_mgmt-tester        FAIL      0.16 seconds
TestRunner_rfcomm-tester      FAIL      0.16 seconds
TestRunner_sco-tester         FAIL      0.16 seconds
TestRunner_ioctl-tester       FAIL      0.16 seconds
TestRunner_mesh-tester        FAIL      0.16 seconds
TestRunner_smp-tester         FAIL      0.16 seconds
TestRunner_userchan-tester    FAIL      0.16 seconds
IncrementalBuild              FAIL      29.66 seconds

Details
##############################
Test: BuildKernel - FAIL
Desc: Build Kernel for Bluetooth
Output:

In file included from net/bluetooth/eir.c:9:
net/bluetooth/eir.c: In function ‘eir_append_local_name’:
net/bluetooth/eir.c:36:19: error: ‘dev’ undeclared (first use in this function); did you mean ‘hdev’?
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
net/bluetooth/eir.c:36:19: note: each undeclared identifier is reported only once for each function it appears in
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:243: net/bluetooth/eir.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:480: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:480: net] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:2032: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
##############################
Test: CheckAllWarning - FAIL
Desc: Run linux kernel with all warning enabled
Output:

In file included from net/bluetooth/eir.c:9:
net/bluetooth/eir.c: In function ‘eir_append_local_name’:
net/bluetooth/eir.c:36:19: error: ‘dev’ undeclared (first use in this function); did you mean ‘hdev’?
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
net/bluetooth/eir.c:36:19: note: each undeclared identifier is reported only once for each function it appears in
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:243: net/bluetooth/eir.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:480: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:480: net] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:2032: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
##############################
Test: CheckSparse - FAIL
Desc: Run sparse tool with linux kernel
Output:

net/bluetooth/af_bluetooth.c:223:25: warning: context imbalance in 'bt_accept_enqueue' - different lock contexts for basic block
drivers/bluetooth/hci_ag6xx.c:257:24: warning: restricted __le32 degrades to integer
drivers/bluetooth/hci_mrvl.c:170:23: warning: restricted __le16 degrades to integer
drivers/bluetooth/hci_mrvl.c:203:23: warning: restricted __le16 degrades to integer
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
./include/net/bluetooth/hci.h:2658:47: warning: array of flexible structures
./include/net/bluetooth/hci.h:2744:43: warning: array of flexible structures
drivers/bluetooth/btmtksdio.c:557:63: warning: Using plain integer as NULL pointer
drivers/bluetooth/btmtksdio.c:579:55: warning: Using plain integer as NULL pointer
drivers/bluetooth/btmtksdio.c:611:63: warning: Using plain integer as NULL pointer
drivers/bluetooth/btmtksdio.c:624:63: warning: Using plain integer as NULL pointer
drivers/bluetooth/hci_nokia.c:284:23: warning: incorrect type in assignment (different base types)
drivers/bluetooth/hci_nokia.c:284:23:    expected unsigned short [usertype] baud
drivers/bluetooth/hci_nokia.c:284:23:    got restricted __le16 [usertype]
drivers/bluetooth/hci_nokia.c:287:26: warning: incorrect type in assignment (different base types)
drivers/bluetooth/hci_nokia.c:287:26:    expected unsigned short [usertype] sys_clk
drivers/bluetooth/hci_nokia.c:287:26:    got restricted __le16 [usertype]
net/bluetooth/hci_codec.c: note: in included file:
./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures
In file included from net/bluetooth/eir.c:9:
net/bluetooth/eir.c: In function ‘eir_append_local_name’:
net/bluetooth/eir.c:36:19: error: ‘dev’ undeclared (first use in this function); did you mean ‘hdev’?
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
net/bluetooth/eir.c:36:19: note: each undeclared identifier is reported only once for each function it appears in
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:243: net/bluetooth/eir.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:480: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:480: net] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:2032: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
./include/net/bluetooth/hci.h:2658:47: warning: array of flexible structures
./include/net/bluetooth/hci.h:2744:43: warning: array of flexible structures
net/bluetooth/hci_codec.c: note: in included file:
./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures
In file included from net/bluetooth/eir.c:9:
net/bluetooth/eir.c: In function ‘eir_append_local_name’:
net/bluetooth/eir.c:36:19: error: ‘dev’ undeclared (first use in this function); did you mean ‘hdev’?
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
net/bluetooth/eir.c:36:19: note: each undeclared identifier is reported only once for each function it appears in
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:243: net/bluetooth/eir.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:480: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:480: net] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:2032: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
##############################
Test: BuildKernel32 - FAIL
Desc: Build 32bit Kernel for Bluetooth
Output:

In file included from net/bluetooth/eir.c:9:
net/bluetooth/eir.c: In function ‘eir_append_local_name’:
net/bluetooth/eir.c:36:19: error: ‘dev’ undeclared (first use in this function); did you mean ‘hdev’?
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
net/bluetooth/eir.c:36:19: note: each undeclared identifier is reported only once for each function it appears in
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:243: net/bluetooth/eir.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:480: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:480: net] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:2032: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
##############################
Test: TestRunnerSetup - FAIL
Desc: Setup kernel and bluez for test-runner
Output:
Kernel: 
In file included from net/bluetooth/eir.c:9:
net/bluetooth/eir.c: In function ‘eir_append_local_name’:
net/bluetooth/eir.c:36:19: error: ‘dev’ undeclared (first use in this function); did you mean ‘hdev’?
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
net/bluetooth/eir.c:36:19: note: each undeclared identifier is reported only once for each function it appears in
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:243: net/bluetooth/eir.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:480: net/bluetooth] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:480: net] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:2032: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_bnep-tester - FAIL
Desc: Run bnep-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_rfcomm-tester - FAIL
Desc: Run rfcomm-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_ioctl-tester - FAIL
Desc: Run ioctl-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_smp-tester - FAIL
Desc: Run smp-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_userchan-tester - FAIL
Desc: Run userchan-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: IncrementalBuild - FAIL
Desc: Incremental build with the patches in the series
Output:
Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH

In file included from net/bluetooth/eir.c:9:
net/bluetooth/eir.c: In function ‘eir_append_local_name’:
net/bluetooth/eir.c:36:19: error: ‘dev’ undeclared (first use in this function); did you mean ‘hdev’?
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
net/bluetooth/eir.c:36:19: note: each undeclared identifier is reported only once for each function it appears in
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |                   ^~~
./include/net/bluetooth/hci_core.h:1850:33: note: in definition of macro ‘ext_adv_capable’
 1850 | #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
      |                                 ^~~
net/bluetooth/eir.c:36:7: note: in expansion of macro ‘max_adv_len’
   36 |  if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
      |       ^~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:243: net/bluetooth/eir.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:480: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:480: net] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:2032: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2


---
Regards,
Linux Bluetooth


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

* Re: [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH
  2023-08-18 21:22 [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH Luiz Augusto von Dentz
  2023-08-18 21:53 ` bluez.test.bot
@ 2023-08-21 13:03 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-08-21 13:03 UTC (permalink / raw)
  To: Luiz Augusto von Dentz, linux-bluetooth; +Cc: llvm, oe-kbuild-all

Hi Luiz,

kernel test robot noticed the following build errors:

[auto build test ERROR on linux-next/master]
[also build test ERROR on linus/master v6.5-rc7]
[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-hci_core-Fix-missing-instances-using-HCI_MAX_AD_LENGTH/20230821-102220
base:   linux-next/master
patch link:    https://lore.kernel.org/r/20230818212211.3207580-1-luiz.dentz%40gmail.com
patch subject: [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH
config: i386-buildonly-randconfig-002-20230821 (https://download.01.org/0day-ci/archive/20230821/202308212004.EXsdDWkd-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230821/202308212004.EXsdDWkd-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/202308212004.EXsdDWkd-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/bluetooth/eir.c:36:19: error: use of undeclared identifier 'dev'; did you mean 'hdev'?
           if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
                            ^~~
                            hdev
   include/net/bluetooth/hci_core.h:1854:19: note: expanded from macro 'max_adv_len'
           (ext_adv_capable(dev) ? HCI_MAX_EXT_AD_LENGTH : HCI_MAX_AD_LENGTH)
                            ^
   include/net/bluetooth/hci_core.h:1850:33: note: expanded from macro 'ext_adv_capable'
   #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
                                   ^
   include/linux/compiler.h:55:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:57:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^
   net/bluetooth/eir.c:30:42: note: 'hdev' declared here
   u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
                                            ^
>> net/bluetooth/eir.c:36:19: error: use of undeclared identifier 'dev'; did you mean 'hdev'?
           if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
                            ^~~
                            hdev
   include/net/bluetooth/hci_core.h:1854:19: note: expanded from macro 'max_adv_len'
           (ext_adv_capable(dev) ? HCI_MAX_EXT_AD_LENGTH : HCI_MAX_AD_LENGTH)
                            ^
   include/net/bluetooth/hci_core.h:1850:33: note: expanded from macro 'ext_adv_capable'
   #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
                                   ^
   include/linux/compiler.h:55:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:57:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^
   net/bluetooth/eir.c:30:42: note: 'hdev' declared here
   u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
                                            ^
>> net/bluetooth/eir.c:36:19: error: use of undeclared identifier 'dev'; did you mean 'hdev'?
           if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
                            ^~~
                            hdev
   include/net/bluetooth/hci_core.h:1854:19: note: expanded from macro 'max_adv_len'
           (ext_adv_capable(dev) ? HCI_MAX_EXT_AD_LENGTH : HCI_MAX_AD_LENGTH)
                            ^
   include/net/bluetooth/hci_core.h:1850:33: note: expanded from macro 'ext_adv_capable'
   #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
                                   ^
   include/linux/compiler.h:55:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:57:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^
   include/linux/compiler.h:68:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^
   net/bluetooth/eir.c:30:42: note: 'hdev' declared here
   u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
                                            ^
   3 errors generated.


vim +36 net/bluetooth/eir.c

    29	
    30	u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
    31	{
    32		size_t short_len;
    33		size_t complete_len;
    34	
    35		/* no space left for name (+ NULL + type + len) */
  > 36		if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
    37			return ad_len;
    38	
    39		/* use complete name if present and fits */
    40		complete_len = strnlen(hdev->dev_name, sizeof(hdev->dev_name));
    41		if (complete_len && complete_len <= HCI_MAX_SHORT_NAME_LENGTH)
    42			return eir_append_name(ptr, ad_len, EIR_NAME_COMPLETE,
    43					       hdev->dev_name, complete_len + 1);
    44	
    45		/* use short name if present */
    46		short_len = strnlen(hdev->short_name, sizeof(hdev->short_name));
    47		if (short_len)
    48			return eir_append_name(ptr, ad_len, EIR_NAME_SHORT,
    49					       hdev->short_name,
    50					       short_len == HCI_MAX_SHORT_NAME_LENGTH ?
    51					       short_len : short_len + 1);
    52	
    53		/* use shortened full name if present, we already know that name
    54		 * is longer then HCI_MAX_SHORT_NAME_LENGTH
    55		 */
    56		if (complete_len)
    57			return eir_append_name(ptr, ad_len, EIR_NAME_SHORT,
    58					       hdev->dev_name,
    59					       HCI_MAX_SHORT_NAME_LENGTH);
    60	
    61		return ad_len;
    62	}
    63	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2023-08-21 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 21:22 [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH Luiz Augusto von Dentz
2023-08-18 21:53 ` bluez.test.bot
2023-08-21 13:03 ` [PATCH] " 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.