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: <202210092058.ZxoHVuuE-lkp@intel.com>
Date:   Sun, 9 Oct 2022 20:08:38 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Will Deacon <will@...nel.org>, Christoph Hellwig <hch@....de>,
        Arnd Bergmann <arnd@...db.de>,
        "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Subject: arch/arm/kernel/crash_dump.c:33:17: sparse: sparse: incorrect type
 in argument 1 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a6afa4199d3d038fbfdff5511f7523b0e30cb774
commit: d803336abdbc1bfacdb32b2cf9f4fdbee072b8ee ARM: mm: kill unused runtime hook arch_iounmap()
date:   3 months ago
config: arm-randconfig-s052-20221009
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=d803336abdbc1bfacdb32b2cf9f4fdbee072b8ee
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d803336abdbc1bfacdb32b2cf9f4fdbee072b8ee
        # 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/kernel/

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/kernel/crash_dump.c:27:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *vaddr @@     got void [noderef] __iomem * @@
   arch/arm/kernel/crash_dump.c:27:15: sparse:     expected void *vaddr
   arch/arm/kernel/crash_dump.c:27:15: sparse:     got void [noderef] __iomem *
>> arch/arm/kernel/crash_dump.c:33:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *io_addr @@     got void *vaddr @@
   arch/arm/kernel/crash_dump.c:33:17: sparse:     expected void volatile [noderef] __iomem *io_addr
   arch/arm/kernel/crash_dump.c:33:17: sparse:     got void *vaddr

vim +33 arch/arm/kernel/crash_dump.c

67742c8168ed66 Mika Westerberg         2010-05-10  18  
5d8de293c22489 Matthew Wilcox (Oracle  2022-04-29  19) ssize_t copy_oldmem_page(struct iov_iter *iter, unsigned long pfn,
5d8de293c22489 Matthew Wilcox (Oracle  2022-04-29  20) 			 size_t csize, unsigned long offset)
67742c8168ed66 Mika Westerberg         2010-05-10  21  {
67742c8168ed66 Mika Westerberg         2010-05-10  22  	void *vaddr;
67742c8168ed66 Mika Westerberg         2010-05-10  23  
67742c8168ed66 Mika Westerberg         2010-05-10  24  	if (!csize)
67742c8168ed66 Mika Westerberg         2010-05-10  25  		return 0;
67742c8168ed66 Mika Westerberg         2010-05-10  26  
8fad87bca7ac97 Liu Hua                 2014-03-27  27  	vaddr = ioremap(__pfn_to_phys(pfn), PAGE_SIZE);
67742c8168ed66 Mika Westerberg         2010-05-10  28  	if (!vaddr)
67742c8168ed66 Mika Westerberg         2010-05-10  29  		return -ENOMEM;
67742c8168ed66 Mika Westerberg         2010-05-10  30  
5d8de293c22489 Matthew Wilcox (Oracle  2022-04-29  31) 	csize = copy_to_iter(vaddr + offset, csize, iter);
67742c8168ed66 Mika Westerberg         2010-05-10  32  
67742c8168ed66 Mika Westerberg         2010-05-10 @33  	iounmap(vaddr);

:::::: The code at line 33 was first introduced by commit
:::::: 67742c8168ed66fdd6cb5dc90e06c43cdc5bba07 ARM: 6120/1: kdump: implement copy_oldmem_page()

:::::: TO: Mika Westerberg <mika.westerberg@....fi>
:::::: 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" (139296 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ