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]
Date:   Tue, 22 Dec 2020 08:23:43 +0800
From:   kernel test robot <lkp@...el.com>
To:     Anup Patel <anup.patel@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        Atish Patra <atish.patra@....com>
Subject: drivers/clocksource/timer-clint.c:72:24: sparse: sparse: cast
 removes address space '__iomem' of expression

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8653b778e454a7708847aeafe689bce07aeeb94e
commit: 2ac6795fcc085e8d03649f1bbd0d70aaff612cad clocksource/drivers: Add CLINT timer driver
date:   4 months ago
config: riscv-randconfig-s031-20201221 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.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.3-184-g1b896707-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2ac6795fcc085e8d03649f1bbd0d70aaff612cad
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 2ac6795fcc085e8d03649f1bbd0d70aaff612cad
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv 

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/clocksource/timer-clint.c:72:24: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/clocksource/timer-clint.c:72:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
   drivers/clocksource/timer-clint.c:72:24: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/clocksource/timer-clint.c:72:24: sparse:     got unsigned int [usertype] *
   drivers/clocksource/timer-clint.c:70:22: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/clocksource/timer-clint.c:70:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
   drivers/clocksource/timer-clint.c:70:22: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/clocksource/timer-clint.c:70:22: sparse:     got unsigned int [usertype] *
   drivers/clocksource/timer-clint.c:219:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void * @@     got struct clock_event_device [noderef] __percpu * @@
   drivers/clocksource/timer-clint.c:219:36: sparse:     expected void *
   drivers/clocksource/timer-clint.c:219:36: sparse:     got struct clock_event_device [noderef] __percpu *

vim +/__iomem +72 drivers/clocksource/timer-clint.c

    58	
    59	#ifdef CONFIG_64BIT
    60	static u64 notrace clint_get_cycles64(void)
    61	{
    62		return clint_get_cycles();
    63	}
    64	#else /* CONFIG_64BIT */
    65	static u64 notrace clint_get_cycles64(void)
    66	{
    67		u32 hi, lo;
    68	
    69		do {
    70			hi = clint_get_cycles_hi();
    71			lo = clint_get_cycles();
  > 72		} while (hi != clint_get_cycles_hi());
    73	
    74		return ((u64)hi << 32) | lo;
    75	}
    76	#endif /* CONFIG_64BIT */
    77	

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

Powered by blists - more mailing lists