* [ammarfaizi2-block:google/android/kernel/common/android12-trusty-5.10 1711/5872] arch/arm64/mm/fault.c:492:31: sparse: sparse: incorrect type in return expression (different base types)
@ 2022-07-16 12:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-16 12:37 UTC (permalink / raw)
To: Ammar Faizi, GNU/Weeb Mailing List; +Cc: kbuild-all
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-trusty-5.10
head: 07055bfd3d810d41a38354693dfaa55a6f8c0025
commit: 2fd69fa6bcab984b56ccfd4860b10f11f1966bed [1711/5872] FROMLIST: arm64/mm: add speculative page fault
config: arm64-randconfig-s042-20220715 (https://download.01.org/0day-ci/archive/20220716/[email protected]/config)
compiler: aarch64-linux-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://github.com/ammarfaizi2/linux-block/commit/2fd69fa6bcab984b56ccfd4860b10f11f1966bed
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android12-trusty-5.10
git checkout 2fd69fa6bcab984b56ccfd4860b10f11f1966bed
# 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=arm64 SHELL=/bin/bash arch/arm64/mm/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
sparse warnings: (new ones prefixed by >>)
>> arch/arm64/mm/fault.c:492:31: sparse: sparse: incorrect type in return expression (different base types) @@ expected int @@ got restricted vm_fault_t @@
arch/arm64/mm/fault.c:492:31: sparse: expected int
arch/arm64/mm/fault.c:492:31: sparse: got restricted vm_fault_t
arch/arm64/mm/fault.c:561:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted vm_fault_t [usertype] fault @@ got int @@
arch/arm64/mm/fault.c:561:15: sparse: expected restricted vm_fault_t [usertype] fault
arch/arm64/mm/fault.c:561:15: sparse: got int
arch/arm64/mm/fault.c:591:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted vm_fault_t [usertype] fault @@ got int @@
arch/arm64/mm/fault.c:591:15: sparse: expected restricted vm_fault_t [usertype] fault
arch/arm64/mm/fault.c:591:15: sparse: got int
arch/arm64/mm/fault.c:620:13: sparse: sparse: restricted vm_fault_t degrades to integer
arch/arm64/mm/fault.c:620:13: sparse: sparse: restricted vm_fault_t degrades to integer
arch/arm64/mm/fault.c:665:39: sparse: sparse: restricted vm_fault_t degrades to integer
vim +492 arch/arm64/mm/fault.c
1d18c47c735e8a Catalin Marinas 2012-03-05 471
1d18c47c735e8a Catalin Marinas 2012-03-05 472 if (unlikely(!vma))
4745224b45097d Anshuman Khandual 2019-06-07 473 return VM_FAULT_BADMAP;
1d18c47c735e8a Catalin Marinas 2012-03-05 474
1d18c47c735e8a Catalin Marinas 2012-03-05 475 /*
1d18c47c735e8a Catalin Marinas 2012-03-05 476 * Ok, we have a good vm_area for this memory access, so we can handle
1d18c47c735e8a Catalin Marinas 2012-03-05 477 * it.
1d18c47c735e8a Catalin Marinas 2012-03-05 478 */
4745224b45097d Anshuman Khandual 2019-06-07 479 if (unlikely(vma->vm_start > addr)) {
4745224b45097d Anshuman Khandual 2019-06-07 480 if (!(vma->vm_flags & VM_GROWSDOWN))
4745224b45097d Anshuman Khandual 2019-06-07 481 return VM_FAULT_BADMAP;
4745224b45097d Anshuman Khandual 2019-06-07 482 if (expand_stack(vma, addr))
4745224b45097d Anshuman Khandual 2019-06-07 483 return VM_FAULT_BADMAP;
4745224b45097d Anshuman Khandual 2019-06-07 484 }
4745224b45097d Anshuman Khandual 2019-06-07 485
db6f41063cbdb5 Will Deacon 2013-07-19 486 /*
db6f41063cbdb5 Will Deacon 2013-07-19 487 * Check that the permissions on the VMA allow for the fault which
cab15ce604e550 Catalin Marinas 2016-08-11 488 * occurred.
db6f41063cbdb5 Will Deacon 2013-07-19 489 */
4745224b45097d Anshuman Khandual 2019-06-07 490 if (!(vma->vm_flags & vm_flags))
4745224b45097d Anshuman Khandual 2019-06-07 491 return VM_FAULT_BADACCESS;
6a1bb025d28e10 Peter Xu 2020-08-11 @492 return handle_mm_fault(vma, addr & PAGE_MASK, mm_flags, regs);
1d18c47c735e8a Catalin Marinas 2012-03-05 493 }
1d18c47c735e8a Catalin Marinas 2012-03-05 494
:::::: The code at line 492 was first introduced by commit
:::::: 6a1bb025d28e1026fead73b7b33e2dfccba3f4d2 mm/arm64: use general page fault accounting
:::::: TO: Peter Xu <[email protected]>
:::::: CC: Linus Torvalds <[email protected]>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-16 12:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-16 12:37 [ammarfaizi2-block:google/android/kernel/common/android12-trusty-5.10 1711/5872] arch/arm64/mm/fault.c:492:31: sparse: sparse: incorrect type in return expression (different base types) kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox