public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mahendran Ganesh <opensource.ganesh@gmail.com>
Cc: kbuild-all@lists.01.org,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
	linux-kernel@vger.kernel.org,
	Suren Baghdasaryan <surenb@google.com>,
	Vinayak Menon <vinmenon@codeaurora.org>,
	Charan Teja Reddy <charante@codeaurora.org>
Subject: [ammarfaizi2-block:google/android/kernel/common/android-gs-raviole-5.10-android12-qpr1-d 1711/8858] arch/arm64/mm/fault.c:492:31: sparse: sparse: incorrect type in return expression (different base types)
Date: Tue, 8 Feb 2022 09:08:56 +0800	[thread overview]
Message-ID: <202202080945.Pweq3bsl-lkp@intel.com> (raw)

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-gs-raviole-5.10-android12-qpr1-d
head:   9771767708df4fcf51cd1642e041c804a86e740c
commit: 2fd69fa6bcab984b56ccfd4860b10f11f1966bed [1711/8858] FROMLIST: arm64/mm: add speculative page fault
config: arm64-randconfig-s031-20220207 (https://download.01.org/0day-ci/archive/20220208/202202080945.Pweq3bsl-lkp@intel.com/config)
compiler: aarch64-linux-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://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/android-gs-raviole-5.10-android12-qpr1-d
        git checkout 2fd69fa6bcab984b56ccfd4860b10f11f1966bed
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 as appropriate
Reported-by: kernel test robot <lkp@intel.com>


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 <peterx@redhat.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

                 reply	other threads:[~2022-02-08  1:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202202080945.Pweq3bsl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=charante@codeaurora.org \
    --cc=gwml@vger.gnuweeb.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opensource.ganesh@gmail.com \
    --cc=surenb@google.com \
    --cc=vinmenon@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox