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: <202210191824.AgbWOMCd-lkp@intel.com>
Date:   Wed, 19 Oct 2022 18:18:11 +0800
From:   kernel test robot <lkp@...el.com>
To:     John Crispin <john@...ozen.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Matthias Brugger <matthias.bgg@...il.com>,
        Bert Vermeulen <bert@...t.com>, Felix Fietkau <nbd@....name>
Subject: arch/arm/include/asm/arch_gicv3.h:151:9: sparse: sparse: cast
 truncates bits from constant value (2000000000000000 becomes 0)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   aae703b02f92bde9264366c545e87cec451de471
commit: 2cf1c348d0f5d43b601974cbde3e6db5ad491a40 ARM: Add basic support for Airoha EN7523 SoC
date:   8 months ago
config: arm-randconfig-s043-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2cf1c348d0f5d43b601974cbde3e6db5ad491a40
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 2cf1c348d0f5d43b601974cbde3e6db5ad491a40
        # 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 arch/arm/mach-mvebu/ arch/arm/mach-tegra/ drivers/irqchip/

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/irqchip/irq-gic-v3.c:891:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3.c:891:17: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3.c:891:17: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3.c:943:78: sparse: sparse: dubious: !x | y
   drivers/irqchip/irq-gic-v3.c:233:29: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3.c:256:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3.c:346:24: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3.c:363:24: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3.c:197:24: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3.c:594:24: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3.c:892:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3.c:893:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3.c: note: in included file (through include/linux/irqchip/arm-gic-v3.h):
>> arch/arm/include/asm/arch_gicv3.h:151:9: sparse: sparse: cast truncates bits from constant value (2000000000000000 becomes 0)
   drivers/irqchip/irq-gic-v3.c:1130:17: sparse: sparse: dereference of noderef expression
--
   drivers/irqchip/irq-gic-v3-its.c:1456:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:1456:9: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3-its.c:1456:9: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:1461:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:1461:9: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3-its.c:1461:9: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:2827:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct cpumask [usertype] **mask @@     got struct cpumask [usertype] *[noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:2827:45: sparse:     expected struct cpumask [usertype] **mask
   drivers/irqchip/irq-gic-v3-its.c:2827:45: sparse:     got struct cpumask [usertype] *[noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:3936:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:3936:17: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3-its.c:3936:17: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:3940:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:3940:17: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3-its.c:3940:17: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:4118:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:4118:9: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3-its.c:4118:9: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:4123:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:4123:9: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3-its.c:4123:9: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:4258:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:4258:9: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3-its.c:4258:9: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:4276:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct raw_spinlock [usertype] *lock @@     got struct raw_spinlock [noderef] __percpu * @@
   drivers/irqchip/irq-gic-v3-its.c:4276:9: sparse:     expected struct raw_spinlock [usertype] *lock
   drivers/irqchip/irq-gic-v3-its.c:4276:9: sparse:     got struct raw_spinlock [noderef] __percpu *
   drivers/irqchip/irq-gic-v3-its.c:263:12: sparse: sparse: context imbalance in 'vpe_to_cpuid_lock' - wrong count at exit
   drivers/irqchip/irq-gic-v3-its.c:269:13: sparse: sparse: context imbalance in 'vpe_to_cpuid_unlock' - unexpected unlock
   drivers/irqchip/irq-gic-v3-its.c:1457:18: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2234:23: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2234:23: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2644:15: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2644:15: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2665:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2699:15: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2699:15: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2703:38: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2721:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2721:49: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2722:25: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2732:30: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2775:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2802:35: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c: note: in included file (through include/linux/irqchip/arm-gic-v3.h):
>> arch/arm/include/asm/arch_gicv3.h:151:9: sparse: sparse: cast truncates bits from constant value (2000000000000000 becomes 0)
   drivers/irqchip/irq-gic-v3-its.c:2831:9: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2832:14: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2902:9: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2914:45: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2914:45: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2916:9: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2968:15: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2968:15: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2983:15: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:2983:15: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3008:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3046:31: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3051:13: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3070:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3075:21: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3128:43: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3163:9: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3164:9: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3195:26: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3198:26: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3198:26: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3748:26: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3797:13: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3798:36: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3798:36: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3813:35: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3827:35: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3859:35: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3937:26: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:3977:26: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:4057:35: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:4072:35: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:4119:18: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:4259:16: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5119:19: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5119:19: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5124:31: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5144:14: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5221:13: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5224:21: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5234:13: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5236:17: sparse: sparse: dereference of noderef expression
   drivers/irqchip/irq-gic-v3-its.c:5247:9: sparse: sparse: dereference of noderef expression

vim +151 arch/arm/include/asm/arch_gicv3.h

e99da7c6f51b48 Julien Thierry        2019-01-31  139  
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  140  /*
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  141   * Even in 32bit systems that use LPAE, there is no guarantee that the I/O
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  142   * interface provides true 64bit atomic accesses, so using strd/ldrd doesn't
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  143   * make much sense.
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  144   * Moreover, 64bit I/O emulation is extremely difficult to implement on
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  145   * AArch32, since the syndrome register doesn't provide any information for
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  146   * them.
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  147   * Consequently, the following IO helpers use 32bit accesses.
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  148   */
92116b804a02a9 Vladimir Murzin       2016-11-02  149  static inline void __gic_writeq_nonatomic(u64 val, volatile void __iomem *addr)
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  150  {
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01 @151  	writel_relaxed((u32)val, addr);
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  152  	writel_relaxed((u32)(val >> 32), addr + 4);
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  153  }
d5cd50d318f70f Jean-Philippe Brucker 2015-10-01  154  

:::::: The code at line 151 was first introduced by commit
:::::: d5cd50d318f70fc62cc2e1399f5f4a0803291395 ARM: add 32bit support to GICv3

:::::: TO: Jean-Philippe Brucker <jean-philippe.brucker@....com>
:::::: CC: Marc Zyngier <marc.zyngier@....com>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ