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]
Date:   Tue, 25 Oct 2022 22:49:14 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     kernel test robot <lkp@...el.com>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: Re: drivers/net/ethernet/renesas/rswitch.c:355:71: warning: left
 shift count >= width of type

Hi k.t.r.,

On 10/22/22 08:23, kernel test robot wrote:
> tree:   https://github.com/intel-lab-lkp/linux/commits/Yoshihiro-Shimoda/net-phy-marvell10g-Add-host-speed-setting-by-an-ethernet-driver/20221020-091402
> head:   54882d9015d6bc070075b3ab4eab5cf4d75cf56e
> commit: 77bfe15a20a8c80e2150e86970e1157acfca24f8 net: ethernet: renesas: Add Ethernet Switch driver
> date:   3 days ago
> config: parisc64-allyesconfig

The attached .config file does not contain "CONFIG_64BIT".
How did you generate it?

(more below)


> compiler: hppa-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/intel-lab-lkp/linux/commit/77bfe15a20a8c80e2150e86970e1157acfca24f8
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review Yoshihiro-Shimoda/net-phy-marvell10g-Add-host-speed-setting-by-an-ethernet-driver/20221020-091402
>         git checkout 77bfe15a20a8c80e2150e86970e1157acfca24f8
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/media/platform/chips-media/ drivers/net/ethernet/renesas/ drivers/staging/vt6655/

For 64BIT parisc builds, it would be better to use
	ARCH=parisc64

See 805ce8614958: parisc: Allow CONFIG_64BIT with ARCH=parisc
and 3dcfb729b5f4: parisc: Make CONFIG_64BIT available for ARCH=parisc64 only

To use only ARCH=parisc, you must ensure that both PA8X00=y and 64BIT=y in the .config file.


> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@...el.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/net/ethernet/renesas/rswitch.c: In function 'rswitch_ext_desc_get_dptr':
>>> drivers/net/ethernet/renesas/rswitch.c:355:71: warning: left shift count >= width of type [-Wshift-count-overflow]
>      355 |         return __le32_to_cpu(desc->dptrl) | (dma_addr_t)(desc->dptrh) << 32;
>          |                                                                       ^~
>    drivers/net/ethernet/renesas/rswitch.c: In function 'rswitch_ext_ts_desc_get_dptr':
>    drivers/net/ethernet/renesas/rswitch.c:367:71: warning: left shift count >= width of type [-Wshift-count-overflow]
>      367 |         return __le32_to_cpu(desc->dptrl) | (dma_addr_t)(desc->dptrh) << 32;
>          |                                                                       ^~
> 
> 
> vim +355 drivers/net/ethernet/renesas/rswitch.c
> 
>    352	
>    353	static dma_addr_t rswitch_ext_desc_get_dptr(struct rswitch_ext_desc *desc)
>    354	{
>  > 355		return __le32_to_cpu(desc->dptrl) | (dma_addr_t)(desc->dptrh) << 32;
>    356	}
>    357	
> 

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ