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: <66AB9A6F-4D24-4033-96B9-E5F2F700029D@toblux.com>
Date: Fri, 17 May 2024 01:21:04 +0200
From: Thorsten Blum <thorsten.blum@...lux.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Arnd Bergmann <arnd@...db.de>,
 "David S. Miller" <davem@...emloft.net>,
 edumazet@...gle.com,
 glaubitz@...sik.fu-berlin.de,
 kuba@...nel.org,
 linux-kernel@...r.kernel.org,
 lkp@...el.com,
 netdev@...r.kernel.org,
 nico@...xnic.net,
 pabeni@...hat.com
Subject: Re: [PATCH v3] net: smc91x: Fix pointer types

On 17. May 2024, at 00:51, Andrew Lunn <andrew@...n.ch> wrote:
> On Fri, May 17, 2024 at 12:30:05AM +0200, Thorsten Blum wrote:
>> Use void __iomem pointers as parameters for mcf_insw() and mcf_outsw()
>> to align with the parameter types of readw() and writew() to fix the
>> following warnings reported by kernel test robot:
>> 
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces)
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse:    expected void *a
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse:    got void [noderef] __iomem *
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces)
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse:    expected void *a
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse:    got void [noderef] __iomem *
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces)
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse:    expected void *a
>> drivers/net/ethernet/smsc/smc91x.c:590:9: sparse:    got void [noderef] __iomem *
>> drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: warning: incorrect type in argument 1 (different address spaces)
>> drivers/net/ethernet/smsc/smc91x.c:483:17: sparse:    expected void *a
>> drivers/net/ethernet/smsc/smc91x.c:483:17: sparse:    got void [noderef] __iomem *
>> 
>> Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>
>> Reported-by: kernel test robot <lkp@...el.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202405160853.3qyaSj8w-lkp@intel.com/
>> Acked-by: Nicolas Pitre <nico@...xnic.net>
>> Reviewed-by: Andrew Lunn <andrew@...n.ch>
>> ---
>> Changes in v2:
>> - Use lp->base instead of __ioaddr as suggested by Andrew Lunn. They are
>> essentially the same, but using lp->base results in a smaller diff
>> - Remove whitespace only changes as suggested by Andrew Lunn
>> - Preserve Acked-by: Nicolas Pitre tag (please let me know if you
>> somehow disagree with the changes in v2 or v3)
>> 
>> Changes in v3:
>> - Revert changing the macros as this is unnecessary. Neither the types
>>  nor the __iomem attributes get lost across macro boundaries
>> - Preserve Reviewed-by: Andrew Lunn tag (please let me know if you
>>  somehow disagree with the changes in v3)
> 
> This fixes the warning, but we still have the macro accessing things
> not passed to them. If you are going to brother to fix the warnings,
> it would also be good to fix the bad practice. Please make a patchset
> to do this.

I would prefer to submit another patch to fix the macros. I submitted v3
because the patch description for v2 was wrong (type information or
attributes don't get lost across macro boundaries) and the macro changes
are unnecessary to fix the warnings.

I should never have changed the macros, but after first adding __iomem
to mcf_insw() and mcf_outsw(), I kept getting the same errors and looked
for the problem in the SMC_* macros. I probably didn't do a clean build
or forgot to save my changes and just refactored the macros as a side
effect.

> It would also be good if you read:
> 
> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

Will do.

Thanks,
Thorsten

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ