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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 3 Jun 2021 12:53:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Subject: arch/sh/mm/cache-sh2a.c:71:46: sparse: sparse: incorrect type in
 argument 1 (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   324c92e5e0ee0e993bdb106fac407846ed677f6b
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date:   9 months ago
config: sh-randconfig-s031-20210603 (attached as .config)
compiler: sh4-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-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5fc436f06eef54ef512ea55a9db8eb9f2e76959
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
        # 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__' W=1 ARCH=sh 

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 >>)
   arch/sh/mm/cache-sh2a.c:31:16: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long @@
   arch/sh/mm/cache-sh2a.c:31:16: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:31:16: sparse:     got unsigned long
   arch/sh/mm/cache-sh2a.c:34:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long @@
   arch/sh/mm/cache-sh2a.c:34:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:34:17: sparse:     got unsigned long
   arch/sh/mm/cache-sh2a.c:43:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long @@
   arch/sh/mm/cache-sh2a.c:43:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:43:9: sparse:     got unsigned long
>> arch/sh/mm/cache-sh2a.c:71:46: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long [assigned] v @@
   arch/sh/mm/cache-sh2a.c:71:46: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:71:46: sparse:     got unsigned long [assigned] v
   arch/sh/mm/cache-sh2a.c:73:33: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long [assigned] v @@
   arch/sh/mm/cache-sh2a.c:73:33: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:73:33: sparse:     got unsigned long [assigned] v
   arch/sh/mm/cache-sh2a.c:136:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/mm/cache-sh2a.c:136:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:136:17: sparse:     got unsigned int
   arch/sh/mm/cache-sh2a.c:136:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/mm/cache-sh2a.c:136:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:136:17: sparse:     got unsigned int
   arch/sh/mm/cache-sh2a.c:170:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/mm/cache-sh2a.c:170:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:170:17: sparse:     got unsigned int
   arch/sh/mm/cache-sh2a.c:170:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/mm/cache-sh2a.c:170:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/mm/cache-sh2a.c:170:17: sparse:     got unsigned int
--
>> arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: sparse:     got unsigned int
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:93:20: sparse: sparse: Using plain integer as NULL pointer
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:94:20: sparse: sparse: Using plain integer as NULL pointer
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:95:20: sparse: sparse: Using plain integer as NULL pointer
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:96:20: sparse: sparse: Using plain integer as NULL pointer
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:97:20: sparse: sparse: Using plain integer as NULL pointer
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:98:20: sparse: sparse: Using plain integer as NULL pointer
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:99:20: sparse: sparse: Using plain integer as NULL pointer
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:100:20: sparse: sparse: Using plain integer as NULL pointer
   arch/sh/kernel/cpu/sh2a/clock-sh7264.c:101:20: sparse: sparse: Using plain integer as NULL pointer
--
>> arch/sh/kernel/cpu/sh2a/setup-sh7264.c:474:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh2a/setup-sh7264.c:474:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh2a/setup-sh7264.c:474:9: sparse:     got unsigned int

vim +71 arch/sh/mm/cache-sh2a.c

c1537b4863da62 Phil Edworthy  2012-01-09  45  
c1537b4863da62 Phil Edworthy  2012-01-09  46  /*
c1537b4863da62 Phil Edworthy  2012-01-09  47   * Write back the dirty D-caches, but not invalidate them.
c1537b4863da62 Phil Edworthy  2012-01-09  48   */
a58e1a2ab4f633 Paul Mundt     2009-08-15  49  static void sh2a__flush_wback_region(void *start, int size)
cce2d453e4940d Yoshinori Sato 2008-08-04  50  {
c1537b4863da62 Phil Edworthy  2012-01-09  51  #ifdef CONFIG_CACHE_WRITEBACK
cce2d453e4940d Yoshinori Sato 2008-08-04  52  	unsigned long v;
cce2d453e4940d Yoshinori Sato 2008-08-04  53  	unsigned long begin, end;
cce2d453e4940d Yoshinori Sato 2008-08-04  54  	unsigned long flags;
c1537b4863da62 Phil Edworthy  2012-01-09  55  	int nr_ways;
cce2d453e4940d Yoshinori Sato 2008-08-04  56  
cce2d453e4940d Yoshinori Sato 2008-08-04  57  	begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
cce2d453e4940d Yoshinori Sato 2008-08-04  58  	end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
cce2d453e4940d Yoshinori Sato 2008-08-04  59  		& ~(L1_CACHE_BYTES-1);
c1537b4863da62 Phil Edworthy  2012-01-09  60  	nr_ways = current_cpu_data.dcache.ways;
cce2d453e4940d Yoshinori Sato 2008-08-04  61  
cce2d453e4940d Yoshinori Sato 2008-08-04  62  	local_irq_save(flags);
cce2d453e4940d Yoshinori Sato 2008-08-04  63  	jump_to_uncached();
cce2d453e4940d Yoshinori Sato 2008-08-04  64  
c1537b4863da62 Phil Edworthy  2012-01-09  65  	/* If there are too many pages then flush the entire cache */
c1537b4863da62 Phil Edworthy  2012-01-09  66  	if (((end - begin) >> PAGE_SHIFT) >= MAX_OCACHE_PAGES) {
c1537b4863da62 Phil Edworthy  2012-01-09  67  		begin = CACHE_OC_ADDRESS_ARRAY;
c1537b4863da62 Phil Edworthy  2012-01-09  68  		end = begin + (nr_ways * current_cpu_data.dcache.way_size);
c1537b4863da62 Phil Edworthy  2012-01-09  69  
cce2d453e4940d Yoshinori Sato 2008-08-04  70  		for (v = begin; v < end; v += L1_CACHE_BYTES) {
c1537b4863da62 Phil Edworthy  2012-01-09 @71  			unsigned long data = __raw_readl(v);
c1537b4863da62 Phil Edworthy  2012-01-09  72  			if (data & SH_CACHE_UPDATED)
c1537b4863da62 Phil Edworthy  2012-01-09  73  				__raw_writel(data & ~SH_CACHE_UPDATED, v);
cce2d453e4940d Yoshinori Sato 2008-08-04  74  		}
c1537b4863da62 Phil Edworthy  2012-01-09  75  	} else {
c1537b4863da62 Phil Edworthy  2012-01-09  76  		int way;
c1537b4863da62 Phil Edworthy  2012-01-09  77  		for (way = 0; way < nr_ways; way++) {
c1537b4863da62 Phil Edworthy  2012-01-09  78  			for (v = begin; v < end; v += L1_CACHE_BYTES)
c1537b4863da62 Phil Edworthy  2012-01-09  79  				sh2a_flush_oc_line(v, way);
cce2d453e4940d Yoshinori Sato 2008-08-04  80  		}
cce2d453e4940d Yoshinori Sato 2008-08-04  81  	}
cce2d453e4940d Yoshinori Sato 2008-08-04  82  
cce2d453e4940d Yoshinori Sato 2008-08-04  83  	back_to_cached();
cce2d453e4940d Yoshinori Sato 2008-08-04  84  	local_irq_restore(flags);
c1537b4863da62 Phil Edworthy  2012-01-09  85  #endif
cce2d453e4940d Yoshinori Sato 2008-08-04  86  }
cce2d453e4940d Yoshinori Sato 2008-08-04  87  

:::::: The code at line 71 was first introduced by commit
:::::: c1537b4863da620f12f5b42ece61bf65314148ed sh: sh2a: Improve cache flush/invalidate functions

:::::: TO: Phil Edworthy <phil.edworthy@...esas.com>
:::::: CC: Paul Mundt <lethal@...ux-sh.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ