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: <202210122059.XZnGdEMy-lkp@intel.com>
Date:   Wed, 12 Oct 2022 20:37:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: arch/arm/mm/copypage-xscale.c:84:6: sparse: sparse: symbol
 'xscale_mc_copy_user_highpage' was not declared. Should it be static?

Hi Stephen,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   49da070062390094112b423ba443ea193527b2e4
commit: 7036440eab3e2d47a775d4616909f8235488d714 ARM: omap1: enable multiplatform
date:   4 months ago
config: arm-randconfig-s053-20221012
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=7036440eab3e2d47a775d4616909f8235488d714
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7036440eab3e2d47a775d4616909f8235488d714
        # 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-versatile/ arch/arm/mm/ drivers/mmc/host/ drivers/video/fbdev/ drivers/watchdog/

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 >>)
>> arch/arm/mm/copypage-xscale.c:84:6: sparse: sparse: symbol 'xscale_mc_copy_user_highpage' was not declared. Should it be static?
>> arch/arm/mm/copypage-xscale.c:107:1: sparse: sparse: symbol 'xscale_mc_clear_user_highpage' was not declared. Should it be static?
--
>> arch/arm/mach-versatile/versatile.c:85:23: sparse: sparse: symbol 'versatile_auxdata_lookup' was not declared. Should it be static?
--
>> drivers/mmc/host/wmt-sdmmc.c:242:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int @@     got restricted __be32 [usertype] @@
   drivers/mmc/host/wmt-sdmmc.c:242:39: sparse:     expected unsigned int
   drivers/mmc/host/wmt-sdmmc.c:242:39: sparse:     got restricted __be32 [usertype]
--
>> drivers/watchdog/sa1100_wdt.c:241:24: sparse: sparse: symbol 'sa1100dog_driver' was not declared. Should it be static?
--
>> drivers/video/fbdev/vt8500lcdfb.c:361:33: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected char [noderef] __iomem *screen_base @@     got void *[assigned] fb_mem_virt @@
   drivers/video/fbdev/vt8500lcdfb.c:361:33: sparse:     expected char [noderef] __iomem *screen_base
   drivers/video/fbdev/vt8500lcdfb.c:361:33: sparse:     got void *[assigned] fb_mem_virt
>> drivers/video/fbdev/vt8500lcdfb.c:364:33: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __iomem *palette_cpu @@     got void * @@
   drivers/video/fbdev/vt8500lcdfb.c:364:33: sparse:     expected void [noderef] __iomem *palette_cpu
   drivers/video/fbdev/vt8500lcdfb.c:364:33: sparse:     got void *
>> drivers/video/fbdev/vt8500lcdfb.c:434:30: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected void *cpu_addr @@     got void [noderef] __iomem *palette_cpu @@
   drivers/video/fbdev/vt8500lcdfb.c:434:30: sparse:     expected void *cpu_addr
   drivers/video/fbdev/vt8500lcdfb.c:434:30: sparse:     got void [noderef] __iomem *palette_cpu
   drivers/video/fbdev/vt8500lcdfb.c:459:30: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected void *cpu_addr @@     got void [noderef] __iomem *palette_cpu @@
   drivers/video/fbdev/vt8500lcdfb.c:459:30: sparse:     expected void *cpu_addr
   drivers/video/fbdev/vt8500lcdfb.c:459:30: sparse:     got void [noderef] __iomem *palette_cpu
--
>> drivers/video/fbdev/mx3fb.c:1337:26: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected char [noderef] __iomem *screen_base @@     got void * @@
   drivers/video/fbdev/mx3fb.c:1337:26: sparse:     expected char [noderef] __iomem *screen_base
   drivers/video/fbdev/mx3fb.c:1337:26: sparse:     got void *
>> drivers/video/fbdev/mx3fb.c:1360:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/video/fbdev/mx3fb.c:1378:56: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected void *cpu_addr @@     got char [noderef] __iomem *screen_base @@
   drivers/video/fbdev/mx3fb.c:1378:56: sparse:     expected void *cpu_addr
   drivers/video/fbdev/mx3fb.c:1378:56: sparse:     got char [noderef] __iomem *screen_base
   drivers/video/fbdev/mx3fb.c:1093:17: sparse: sparse: cast removes address space '__iomem' of expression

vim +/xscale_mc_copy_user_highpage +84 arch/arm/mm/copypage-xscale.c

f8f98a9335db4a7 Russell King    2005-06-08   83  
063b0a4207e43ac Russell King    2008-10-31  @84  void xscale_mc_copy_user_highpage(struct page *to, struct page *from,
f00a75c094c340c Russell King    2009-10-05   85  	unsigned long vaddr, struct vm_area_struct *vma)
f8f98a9335db4a7 Russell King    2005-06-08   86  {
5472e862de2bc4a Cong Wang       2011-11-25   87  	void *kto = kmap_atomic(to);
1c9d3df5e88ad7d Richard Purdie  2006-12-30   88  
c01778001a4f5ad Catalin Marinas 2010-09-13   89  	if (!test_and_set_bit(PG_dcache_clean, &from->flags))
cb9f753a3731f7f Huang Ying      2018-04-05   90  		__flush_dcache_page(page_mapping_file(from), from);
1c9d3df5e88ad7d Richard Purdie  2006-12-30   91  
bd31b85960a7fcb Thomas Gleixner 2009-07-03   92  	raw_spin_lock(&minicache_lock);
f8f98a9335db4a7 Russell King    2005-06-08   93  
67ece1443174d85 Russell King    2011-07-02   94  	set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
f8f98a9335db4a7 Russell King    2005-06-08   95  
f8f98a9335db4a7 Russell King    2005-06-08   96  	mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);
f8f98a9335db4a7 Russell King    2005-06-08   97  
bd31b85960a7fcb Thomas Gleixner 2009-07-03   98  	raw_spin_unlock(&minicache_lock);
063b0a4207e43ac Russell King    2008-10-31   99  
5472e862de2bc4a Cong Wang       2011-11-25  100  	kunmap_atomic(kto);
f8f98a9335db4a7 Russell King    2005-06-08  101  }
f8f98a9335db4a7 Russell King    2005-06-08  102  
f8f98a9335db4a7 Russell King    2005-06-08  103  /*
f8f98a9335db4a7 Russell King    2005-06-08  104   * XScale optimised clear_user_page
f8f98a9335db4a7 Russell King    2005-06-08  105   */
303c6443659bc1d Russell King    2008-10-31  106  void
303c6443659bc1d Russell King    2008-10-31 @107  xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr)
f8f98a9335db4a7 Russell King    2005-06-08  108  {
5472e862de2bc4a Cong Wang       2011-11-25  109  	void *ptr, *kaddr = kmap_atomic(page);
c7b680499430795 Arnd Bergmann   2019-08-09  110  	asm volatile("\
c7b680499430795 Arnd Bergmann   2019-08-09  111  .arch xscale					\n\
c7b680499430795 Arnd Bergmann   2019-08-09  112  	mov	r1, %2				\n\
f8f98a9335db4a7 Russell King    2005-06-08  113  	mov	r2, #0				\n\
f8f98a9335db4a7 Russell King    2005-06-08  114  	mov	r3, #0				\n\
303c6443659bc1d Russell King    2008-10-31  115  1:	mov	ip, %0				\n\
bc2eca9a682881f Nicolas Pitre   2018-11-09  116  	strd	r2, r3, [%0], #8		\n\
bc2eca9a682881f Nicolas Pitre   2018-11-09  117  	strd	r2, r3, [%0], #8		\n\
bc2eca9a682881f Nicolas Pitre   2018-11-09  118  	strd	r2, r3, [%0], #8		\n\
bc2eca9a682881f Nicolas Pitre   2018-11-09  119  	strd	r2, r3, [%0], #8		\n\
f8f98a9335db4a7 Russell King    2005-06-08  120  	mcr	p15, 0, ip, c7, c10, 1		@ clean D line\n\
f8f98a9335db4a7 Russell King    2005-06-08  121  	subs	r1, r1, #1			\n\
f8f98a9335db4a7 Russell King    2005-06-08  122  	mcr	p15, 0, ip, c7, c6, 1		@ invalidate D line\n\
303c6443659bc1d Russell King    2008-10-31  123  	bne	1b"
43ae286b7d4d8c4 Nicolas Pitre   2008-11-04  124  	: "=r" (ptr)
43ae286b7d4d8c4 Nicolas Pitre   2008-11-04  125  	: "0" (kaddr), "I" (PAGE_SIZE / 32)
303c6443659bc1d Russell King    2008-10-31  126  	: "r1", "r2", "r3", "ip");
5472e862de2bc4a Cong Wang       2011-11-25  127  	kunmap_atomic(kaddr);
f8f98a9335db4a7 Russell King    2005-06-08  128  }
f8f98a9335db4a7 Russell King    2005-06-08  129  

:::::: The code at line 84 was first introduced by commit
:::::: 063b0a4207e43acbeff3d4b09f43e750e0212b48 [ARM] copypage: provide our own copy_user_highpage()

:::::: TO: Russell King <rmk@...-67.arm.linux.org.uk>
:::::: CC: Russell King <rmk+kernel@....linux.org.uk>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ