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]
Message-ID: <202006250131.PJqmRc2J%lkp@intel.com>
Date:   Thu, 25 Jun 2020 01:50:33 +0800
From:   kernel test robot <lkp@...el.com>
To:     Pawel Dembicki <paweldembicki@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>,
        Florian Fainelli <f.fainelli@...il.com>
Subject: drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse:
 cast to restricted __be32

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3e08a95294a4fb3702bb3d35ed08028433c37fe6
commit: 631e83bf7c0e801f0ab960a97a3228b2dbf9ebeb net: dsa: vsc73xx: add support for parallel mode
date:   12 months ago
config: alpha-randconfig-s031-20200624 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-dirty
        git checkout 631e83bf7c0e801f0ab960a97a3228b2dbf9ebeb
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=alpha CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:83:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] b @@     got restricted __be32 [usertype] @@
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:83:9: sparse:     expected unsigned int [usertype] b
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:83:9: sparse:     got restricted __be32 [usertype]
   arch/alpha/include/uapi/asm/swab.h:29:14: sparse: sparse: undefined identifier '__builtin_alpha_inslh'
   arch/alpha/include/uapi/asm/swab.h:30:14: sparse: sparse: undefined identifier '__builtin_alpha_inswl'
   arch/alpha/include/uapi/asm/swab.h:29:14: sparse: sparse: not a function <noident>
   arch/alpha/include/uapi/asm/swab.h:30:14: sparse: sparse: not a function <noident>

vim +68 drivers/net/dsa/vitesse-vsc73xx-platform.c

    54	
    55	static int vsc73xx_platform_read(struct vsc73xx *vsc, u8 block, u8 subblock,
    56					 u8 reg, u32 *val)
    57	{
    58		struct vsc73xx_platform *vsc_platform = vsc->priv;
    59		u32 offset;
    60	
    61		if (!vsc73xx_is_addr_valid(block, subblock))
    62			return -EINVAL;
    63	
    64		offset = vsc73xx_make_addr(block, subblock, reg);
    65		/* By default vsc73xx running in big-endian mode.
    66		 * (See "Register Addressing" section 5.5.3 in the VSC7385 manual.)
    67		 */
  > 68		*val = ioread32be(vsc_platform->base_addr + offset);
    69	
    70		return 0;
    71	}
    72	
    73	static int vsc73xx_platform_write(struct vsc73xx *vsc, u8 block, u8 subblock,
    74					  u8 reg, u32 val)
    75	{
    76		struct vsc73xx_platform *vsc_platform = vsc->priv;
    77		u32 offset;
    78	
    79		if (!vsc73xx_is_addr_valid(block, subblock))
    80			return -EINVAL;
    81	
    82		offset = vsc73xx_make_addr(block, subblock, reg);
  > 83		iowrite32be(val, vsc_platform->base_addr + offset);
    84	
    85		return 0;
    86	}
    87	

---
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" (32353 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ