Re: [PATCH v2 5/5] Bluetooth: Allow Microsoft extension to indicate curve validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

I love your patch! Yet something to improve:

[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on linus/master v5.12-rc6 next-20210406]
[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]

url:    https://github.com/0day-ci/linux/commits/Marcel-Holtmann/Bluetooth-Add-support-for-reading-AOSP-vendor-capabilities/20210407-022147
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/6fee37bd0831e9e9ea756e496e3403b0a18a0c98
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Marcel-Holtmann/Bluetooth-Add-support-for-reading-AOSP-vendor-capabilities/20210407-022147
        git checkout 6fee37bd0831e9e9ea756e496e3403b0a18a0c98
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   net/bluetooth/mgmt.c: In function 'read_controller_cap':
>> net/bluetooth/mgmt.c:3737:41: error: 'struct hci_dev' has no member named 'msft_curve_validity'
    3737 |  if ((hdev->commands[41] & 0x08) || hdev->msft_curve_validity)
         |                                         ^~


vim +3737 net/bluetooth/mgmt.c

  3715	
  3716	static int read_controller_cap(struct sock *sk, struct hci_dev *hdev,
  3717				       void *data, u16 data_len)
  3718	{
  3719		char buf[20];
  3720		struct mgmt_rp_read_controller_cap *rp = (void *)buf;
  3721		u16 cap_len = 0;
  3722		u8 flags = 0;
  3723		u8 tx_power_range[2];
  3724	
  3725		bt_dev_dbg(hdev, "sock %p", sk);
  3726	
  3727		memset(&buf, 0, sizeof(buf));
  3728	
  3729		hci_dev_lock(hdev);
  3730	
  3731		/* When the Read Simple Pairing Options command is supported, then
  3732		 * the remote public key validation is supported.
  3733		 *
  3734		 * Alternatively, when Microsoft extensions are available, they can
  3735		 * indicate support for public key validation as well.
  3736		 */
> 3737		if ((hdev->commands[41] & 0x08) || hdev->msft_curve_validity)
  3738			flags |= 0x01;	/* Remote public key validation (BR/EDR) */
  3739	
  3740		flags |= 0x02;		/* Remote public key validation (LE) */
  3741	
  3742		/* When the Read Encryption Key Size command is supported, then the
  3743		 * encryption key size is enforced.
  3744		 */
  3745		if (hdev->commands[20] & 0x10)
  3746			flags |= 0x04;	/* Encryption key size enforcement (BR/EDR) */
  3747	
  3748		flags |= 0x08;		/* Encryption key size enforcement (LE) */
  3749	
  3750		cap_len = eir_append_data(rp->cap, cap_len, MGMT_CAP_SEC_FLAGS,
  3751					  &flags, 1);
  3752	
  3753		/* When the Read Simple Pairing Options command is supported, then
  3754		 * also max encryption key size information is provided.
  3755		 */
  3756		if (hdev->commands[41] & 0x08)
  3757			cap_len = eir_append_le16(rp->cap, cap_len,
  3758						  MGMT_CAP_MAX_ENC_KEY_SIZE,
  3759						  hdev->max_enc_key_size);
  3760	
  3761		cap_len = eir_append_le16(rp->cap, cap_len,
  3762					  MGMT_CAP_SMP_MAX_ENC_KEY_SIZE,
  3763					  SMP_MAX_ENC_KEY_SIZE);
  3764	
  3765		/* Append the min/max LE tx power parameters if we were able to fetch
  3766		 * it from the controller
  3767		 */
  3768		if (hdev->commands[38] & 0x80) {
  3769			memcpy(&tx_power_range[0], &hdev->min_le_tx_power, 1);
  3770			memcpy(&tx_power_range[1], &hdev->max_le_tx_power, 1);
  3771			cap_len = eir_append_data(rp->cap, cap_len, MGMT_CAP_LE_TX_PWR,
  3772						  tx_power_range, 2);
  3773		}
  3774	
  3775		rp->cap_len = cpu_to_le16(cap_len);
  3776	
  3777		hci_dev_unlock(hdev);
  3778	
  3779		return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_READ_CONTROLLER_CAP, 0,
  3780					 rp, sizeof(*rp) + cap_len);
  3781	}
  3782	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux