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>] [day] [month] [year] [list]
Date:   Sat, 22 Oct 2022 02:09:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Hector Martin <marcan@...can.st>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>
Subject: [asahilinux:bits/080-wifi 23/38]
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4055:42: sparse:
 sparse: incorrect type in assignment (different base types)

tree:   https://github.com/AsahiLinux/linux bits/080-wifi
head:   567ce17b015ace1b3643f027a5346c25bf4caa85
commit: 10c233eb99b7e0d802ceca4960b71cfabbdf34f6 [23/38] brcmfmac: cfg80211: Add support for PMKID_V3 operations
config: arm-randconfig-s041-20221019
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://github.com/AsahiLinux/linux/commit/10c233eb99b7e0d802ceca4960b71cfabbdf34f6
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux bits/080-wifi
        git checkout 10c233eb99b7e0d802ceca4960b71cfabbdf34f6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/net/wireless/broadcom/brcm80211/brcmfmac/

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

sparse warnings: (new ones prefixed by >>)
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1087:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] version @@     got int @@
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1087:28: sparse:     expected restricted __le16 [usertype] version
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1087:28: sparse:     got int
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1149:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] scan_type @@     got int @@
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1149:38: sparse:     expected restricted __le32 [usertype] scan_type
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1149:38: sparse:     got int
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:790:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned char [usertype] scan_type @@     got restricted __le32 [usertype] scan_type @@
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:790:30: sparse:     expected unsigned char [usertype] scan_type
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:790:30: sparse:     got restricted __le32 [usertype] scan_type
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4055:42: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] time_left @@     got unsigned int @@
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4055:42: sparse:     expected restricted __le32 [usertype] time_left
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4055:42: sparse:     got unsigned int

vim +4055 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

  4033	
  4034	static s32
  4035	brcmf_pmksa_v3_op(struct brcmf_if *ifp, struct cfg80211_pmksa *pmksa,
  4036			  bool alive)
  4037	{
  4038		struct brcmf_pmk_op_v3_le *pmk_op;
  4039		int length = offsetof(struct brcmf_pmk_op_v3_le, pmk);
  4040		int ret;
  4041	
  4042		pmk_op = kzalloc(sizeof(*pmk_op), GFP_KERNEL);
  4043		pmk_op->version = cpu_to_le16(BRCMF_PMKSA_VER_3);
  4044	
  4045		if (!pmksa) {
  4046			/* Flush operation, operate on entire list */
  4047			pmk_op->count = cpu_to_le16(0);
  4048		} else {
  4049			/* Single PMK operation */
  4050			pmk_op->count = cpu_to_le16(1);
  4051			length += sizeof(struct brcmf_pmksa_v3);
  4052			memcpy(pmk_op->pmk[0].bssid, pmksa->bssid, ETH_ALEN);
  4053			memcpy(pmk_op->pmk[0].pmkid, pmksa->pmkid, WLAN_PMKID_LEN);
  4054			pmk_op->pmk[0].pmkid_len = WLAN_PMKID_LEN;
> 4055			pmk_op->pmk[0].time_left = alive ? BRCMF_PMKSA_NO_EXPIRY : 0;
  4056		}
  4057	
  4058		pmk_op->length = cpu_to_le16(length);
  4059	
  4060		ret = brcmf_fil_iovar_data_set(ifp, "pmkid_info", pmk_op, sizeof(*pmk_op));
  4061		kfree(pmk_op);
  4062		return ret;
  4063	}
  4064	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (141803 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ