From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEXHASH_WORD,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gnuweeb.org (Postfix) with ESMTPS id EEA727E254 for ; Sat, 16 Jul 2022 12:38:10 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PCCtN5A0; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657975090; x=1689511090; h=date:from:to:cc:subject:message-id:mime-version; bh=36ozd1+8TUZFGv5Ij3BhpocremHR9UfUr3ovbXDjxnA=; b=PCCtN5A0ivovbORUxXLt454Oi1Lg57yCN7Hx118WH2GZwpKcgKziQ6WF ActJufVbWVTSDyGk7szjxMmkzUXW26GHBGq5eCWqJsBapHtC+eNYiPS1I voUH2EWL1FYkelI5s+0hAMdTT0c36jEXAeAuyYxsv9aCcsN+WxiyC9QVJ UfqJ2IkTERZvd+kCIscwWGIZMiWNMom8YYnAiW7U21JqNtNgNuCFR/7hf YrQRw5hRinZBU+emyClMo7Sux1nLAfzGDyGa9iksXoVTqdwOycW4Acalv zX3SUhr3dhuoTT0Skgbw0QjyztOBV5tObXqBe1vM8zGpa+31dvzbSb56S A==; X-IronPort-AV: E=McAfee;i="6400,9594,10409"; a="287112835" X-IronPort-AV: E=Sophos;i="5.92,276,1650956400"; d="scan'208";a="287112835" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2022 05:38:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,276,1650956400"; d="scan'208";a="546968173" Received: from lkp-server02.sh.intel.com (HELO ff137eb26ff1) ([10.239.97.151]) by orsmga003.jf.intel.com with ESMTP; 16 Jul 2022 05:38:09 -0700 Received: from kbuild by ff137eb26ff1 with local (Exim 4.95) (envelope-from ) id 1oCh3g-0001SK-LT; Sat, 16 Jul 2022 12:38:08 +0000 Date: Sat, 16 Jul 2022 20:37:26 +0800 From: kernel test robot To: Ammar Faizi , GNU/Weeb Mailing List Cc: kbuild-all@lists.01.org Subject: [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) Message-ID: <202207162027.Iwg0zj8Q-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: 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/202207162027.Iwg0zj8Q-lkp@intel.com/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 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 :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://01.org/lkp