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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202111170449.8KzXziyR-lkp@intel.com>
Date:   Wed, 17 Nov 2021 04:14:57 +0800
From:   kernel test robot <lkp@...el.com>
To:     Wang Kefeng <wangkefeng.wang@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Subject: arch/arm/mm/fault.c:210:24: sparse: sparse: incorrect type in return
 expression (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8ab774587903771821b59471cc723bba6d893942
commit: caed89dab0ca0e73d7e016c04e1f5957650f4ec3 ARM: 9128/1: mm: Refactor the __do_page_fault()
date:   4 weeks ago
config: arm-randconfig-s031-20211116 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=caed89dab0ca0e73d7e016c04e1f5957650f4ec3
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout caed89dab0ca0e73d7e016c04e1f5957650f4ec3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/mm/

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/arm/mm/fault.c:210:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted vm_fault_t @@     got int @@
   arch/arm/mm/fault.c:210:24: sparse:     expected restricted vm_fault_t
   arch/arm/mm/fault.c:210:24: sparse:     got int
   arch/arm/mm/fault.c:214:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted vm_fault_t @@     got int @@
   arch/arm/mm/fault.c:214:32: sparse:     expected restricted vm_fault_t
   arch/arm/mm/fault.c:214:32: sparse:     got int
   arch/arm/mm/fault.c:216:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted vm_fault_t @@     got int @@
   arch/arm/mm/fault.c:216:32: sparse:     expected restricted vm_fault_t
   arch/arm/mm/fault.c:216:32: sparse:     got int
   arch/arm/mm/fault.c:218:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted vm_fault_t @@     got int @@
   arch/arm/mm/fault.c:218:32: sparse:     expected restricted vm_fault_t
   arch/arm/mm/fault.c:218:32: sparse:     got int
   arch/arm/mm/fault.c:226:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted vm_fault_t @@     got int @@
   arch/arm/mm/fault.c:226:24: sparse:     expected restricted vm_fault_t
   arch/arm/mm/fault.c:226:24: sparse:     got int
   arch/arm/mm/fault.c:312:13: sparse: sparse: restricted vm_fault_t degrades to integer
   arch/arm/mm/fault.c:312:13: sparse: sparse: restricted vm_fault_t degrades to integer
   arch/arm/mm/fault.c:345:24: sparse: sparse: restricted vm_fault_t degrades to integer

vim +210 arch/arm/mm/fault.c

   202	
   203	static vm_fault_t __kprobes
   204	__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
   205			unsigned int flags, struct task_struct *tsk,
   206			struct pt_regs *regs)
   207	{
   208		struct vm_area_struct *vma = find_vma(mm, addr);
   209		if (unlikely(!vma))
 > 210			return VM_FAULT_BADMAP;
   211	
   212		if (unlikely(vma->vm_start > addr)) {
   213			if (!(vma->vm_flags & VM_GROWSDOWN))
   214				return VM_FAULT_BADMAP;
   215			if (addr < FIRST_USER_ADDRESS)
   216				return VM_FAULT_BADMAP;
   217			if (expand_stack(vma, addr))
   218				return VM_FAULT_BADMAP;
   219		}
   220	
   221		/*
   222		 * Ok, we have a good vm_area for this
   223		 * memory access, so we can handle it.
   224		 */
   225		if (access_error(fsr, vma))
   226			return VM_FAULT_BADACCESS;
   227	
   228		return handle_mm_fault(vma, addr & PAGE_MASK, flags, regs);
   229	}
   230	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ