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] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf141543-fff5-635c-ff51-22f1d9120e09@microchip.com>
Date:   Wed, 30 Aug 2023 00:34:23 +0000
From:   <Ajay.Kathat@...rochip.com>
To:     <kvalo@...nel.org>, <lkp@...el.com>
CC:     <oe-kbuild-all@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
        <linux-wireless@...r.kernel.org>
Subject: Re: drivers/net/wireless/microchip/wilc1000/cfg80211.c:361:42:
 sparse: sparse: incorrect type in assignment (different base types)

Hi Kalle,

On 8/29/23 01:31, Kalle Valo wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Kalle Valo <kvalo@...nel.org> writes:
> 
>> kernel test robot <lkp@...el.com> writes:
>>
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   727dbda16b83600379061c4ca8270ef3e2f51922
>>> commit: c5b331d4f550fb78bf1a553b2517616a5ea913d6 wifi: wilc1000: add WPA3 SAE support
>>> date:   1 year, 3 months ago
>>> config: i386-randconfig-063-20230829 (https://download.01.org/0day-ci/archive/20230829/202308290615.lUTIgqUl-lkp@intel.com/config)
>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230829/202308290615.lUTIgqUl-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@...el.com>
>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202308290615.lUTIgqUl-lkp@intel.com/
>>>
>>> sparse warnings: (new ones prefixed by >>)
>>>>> drivers/net/wireless/microchip/wilc1000/cfg80211.c:361:42: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int key_mgmt_suite @@     got restricted __be32 [usertype] @@
>>>    drivers/net/wireless/microchip/wilc1000/cfg80211.c:361:42: sparse:     expected unsigned int key_mgmt_suite
>>>    drivers/net/wireless/microchip/wilc1000/cfg80211.c:361:42: sparse:     got restricted __be32 [usertype]
>>
>> Yeah, this is an old issue but we really should try to fix this,
>> especially so as I would like to make wireless code sparse warning free
>> in the near future. IIRC there were some problems with nl80211 interface
>> as well so this might not be simple fix still.
> 
> For reference here's the old discussion:
> 
> https://patchwork.kernel.org/project/linux-wireless/patch/20220720160302.231516-1-ajay.kathat@microchip.com/
> 
> Any volunteers to help fix this? I would prefers fixes for issues like
> this compared to questionable random cleanups we always get.
> 
> Maybe we should come up with a todo list somewhere and advocate the
> "cleaners" to work on those items instead?
> 

It seems, the wpa_s is modified to handle the byte order for
'key_mgmt_suite' value. The changes are committed in [1] and it should
work for any byte order.

Now, the above sparse warning can be fixed by just removing the byte
conversion before passing to wpa_s.

vif->auth.key_mgmt_suite = cpu_to_be32(sme->crypto.akm_suites[0]);

to

vif->auth.key_mgmt_suite = sme->crypto.akm_suites[0];

I can push a patch to fix the sparse warning. However the patch will
work with updated wpa_s.


1.
https://w1.fi/cgit/hostap/commit/?id=8392ea9e75eacf30cb09671e463d9a37c3eadd6a

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ