lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202010232157.C8DumIU3-lkp@intel.com>
Date:   Fri, 23 Oct 2020 21:42:54 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>, marcel@...tmann.org,
        johan.hedberg@...il.com
Cc:     kbuild-all@...ts.01.org, max.chou@...ltek.com,
        alex_lu@...lsil.com.cn,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        "open list:BLUETOOTH DRIVERS" <linux-bluetooth@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Bluetooth: btrtl: Ask 8821C to drop old firmware after
 shutdown

Hi Kai-Heng,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on bluetooth/master v5.9 next-20201023]
[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/Kai-Heng-Feng/Bluetooth-btrtl-Ask-8821C-to-drop-old-firmware-after-shutdown/20201022-222743
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: m68k-randconfig-s031-20201023 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-17-g2d3af347-dirty
        # https://github.com/0day-ci/linux/commit/d430672c074dec68229560c1d1309c99cc769efe
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Kai-Heng-Feng/Bluetooth-btrtl-Ask-8821C-to-drop-old-firmware-after-shutdown/20201022-222743
        git checkout d430672c074dec68229560c1d1309c99cc769efe
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/bluetooth/btrtl.c:589:37: sparse: sparse: restricted __le16 degrades to integer
>> drivers/bluetooth/btrtl.c:589:37: sparse: sparse: cast to restricted __le16
>> drivers/bluetooth/btrtl.c:589:37: sparse: sparse: restricted __le16 degrades to integer
>> drivers/bluetooth/btrtl.c:589:37: sparse: sparse: cast to restricted __le16
>> drivers/bluetooth/btrtl.c:589:37: sparse: sparse: restricted __le16 degrades to integer
>> drivers/bluetooth/btrtl.c:589:37: sparse: sparse: cast to restricted __le16
>> drivers/bluetooth/btrtl.c:589:37: sparse: sparse: restricted __le16 degrades to integer
>> drivers/bluetooth/btrtl.c:589:37: sparse: sparse: cast to restricted __le16
   drivers/bluetooth/btrtl.c:590:37: sparse: sparse: restricted __le16 degrades to integer
   drivers/bluetooth/btrtl.c:590:37: sparse: sparse: cast to restricted __le16
   drivers/bluetooth/btrtl.c:590:37: sparse: sparse: restricted __le16 degrades to integer
   drivers/bluetooth/btrtl.c:590:37: sparse: sparse: cast to restricted __le16
   drivers/bluetooth/btrtl.c:590:37: sparse: sparse: restricted __le16 degrades to integer
   drivers/bluetooth/btrtl.c:590:37: sparse: sparse: cast to restricted __le16
   drivers/bluetooth/btrtl.c:590:37: sparse: sparse: restricted __le16 degrades to integer
   drivers/bluetooth/btrtl.c:590:37: sparse: sparse: cast to restricted __le16
   drivers/bluetooth/btrtl.c: note: in included file:
   drivers/bluetooth/btrtl.h:47:45: sparse: sparse: array of flexible structures

vim +589 drivers/bluetooth/btrtl.c

   556	
   557	struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev,
   558						   const char *postfix)
   559	{
   560		struct btrtl_device_info *btrtl_dev;
   561		struct sk_buff *skb;
   562		struct hci_rp_read_local_version *resp;
   563		char cfg_name[40];
   564		u16 hci_rev, lmp_subver;
   565		u8 hci_ver;
   566		int ret;
   567	
   568		btrtl_dev = kzalloc(sizeof(*btrtl_dev), GFP_KERNEL);
   569		if (!btrtl_dev) {
   570			ret = -ENOMEM;
   571			goto err_alloc;
   572		}
   573	
   574		skb = btrtl_read_local_version(hdev);
   575		if (IS_ERR(skb)) {
   576			ret = PTR_ERR(skb);
   577			goto err_free;
   578		}
   579	
   580		resp = (struct hci_rp_read_local_version *)skb->data;
   581		rtl_dev_info(hdev, "examining hci_ver=%02x hci_rev=%04x lmp_ver=%02x lmp_subver=%04x",
   582			     resp->hci_ver, resp->hci_rev,
   583			     resp->lmp_ver, resp->lmp_subver);
   584	
   585		hci_ver = resp->hci_ver;
   586		hci_rev = le16_to_cpu(resp->hci_rev);
   587		lmp_subver = le16_to_cpu(resp->lmp_subver);
   588	
 > 589		if (resp->hci_ver == 0x8 && le16_to_cpu(resp->hci_rev == 0x826c) &&
   590		    resp->lmp_ver == 0x8 && le16_to_cpu(resp->lmp_subver == 0xa99e))
   591			btrtl_dev->drop_fw = true;
   592	
   593		kfree_skb(skb);
   594	
   595		btrtl_dev->ic_info = btrtl_match_ic(lmp_subver, hci_rev, hci_ver,
   596						    hdev->bus);
   597	
   598		if (!btrtl_dev->ic_info) {
   599			rtl_dev_info(hdev, "unknown IC info, lmp subver %04x, hci rev %04x, hci ver %04x",
   600				    lmp_subver, hci_rev, hci_ver);
   601			return btrtl_dev;
   602		}
   603	
   604		if (btrtl_dev->ic_info->has_rom_version) {
   605			ret = rtl_read_rom_version(hdev, &btrtl_dev->rom_version);
   606			if (ret)
   607				goto err_free;
   608		}
   609	
   610		btrtl_dev->fw_len = rtl_load_file(hdev, btrtl_dev->ic_info->fw_name,
   611						  &btrtl_dev->fw_data);
   612		if (btrtl_dev->fw_len < 0) {
   613			rtl_dev_err(hdev, "firmware file %s not found",
   614				    btrtl_dev->ic_info->fw_name);
   615			ret = btrtl_dev->fw_len;
   616			goto err_free;
   617		}
   618	
   619		if (btrtl_dev->ic_info->cfg_name) {
   620			if (postfix) {
   621				snprintf(cfg_name, sizeof(cfg_name), "%s-%s.bin",
   622					 btrtl_dev->ic_info->cfg_name, postfix);
   623			} else {
   624				snprintf(cfg_name, sizeof(cfg_name), "%s.bin",
   625					 btrtl_dev->ic_info->cfg_name);
   626			}
   627			btrtl_dev->cfg_len = rtl_load_file(hdev, cfg_name,
   628							   &btrtl_dev->cfg_data);
   629			if (btrtl_dev->ic_info->config_needed &&
   630			    btrtl_dev->cfg_len <= 0) {
   631				rtl_dev_err(hdev, "mandatory config file %s not found",
   632					    btrtl_dev->ic_info->cfg_name);
   633				ret = btrtl_dev->cfg_len;
   634				goto err_free;
   635			}
   636		}
   637	
   638		return btrtl_dev;
   639	
   640	err_free:
   641		btrtl_free(btrtl_dev);
   642	err_alloc:
   643		return ERR_PTR(ret);
   644	}
   645	EXPORT_SYMBOL_GPL(btrtl_initialize);
   646	

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

Download attachment ".config.gz" of type "application/gzip" (24579 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ