mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jiashuo Liang <liangjs@pku.edu.cn>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, Borislav Petkov <bp@suse.de>
Subject: [tip:x86/urgent 1/1] arch/x86/mm/fault.c:940:27: error: 'ARCH_DEFAULT_PKEY' undeclared
Date: Mon, 20 Sep 2021 22:33:48 +0800	[thread overview]
Message-ID: <202109202245.APvuT8BX-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2486 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/urgent
head:   0829d0b6bf0fb3453608798442deaf00c4a1abec
commit: 0829d0b6bf0fb3453608798442deaf00c4a1abec [1/1] x86/fault: Fix wrong signal when vsyscall fails with pkey
config: x86_64-randconfig-a014-20210920 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=0829d0b6bf0fb3453608798442deaf00c4a1abec
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip x86/urgent
        git checkout 0829d0b6bf0fb3453608798442deaf00c4a1abec
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   arch/x86/mm/fault.c: In function 'do_sigbus':
>> arch/x86/mm/fault.c:940:27: error: 'ARCH_DEFAULT_PKEY' undeclared (first use in this function)
     940 |       SIGBUS, BUS_ADRERR, ARCH_DEFAULT_PKEY);
         |                           ^~~~~~~~~~~~~~~~~
   arch/x86/mm/fault.c:940:27: note: each undeclared identifier is reported only once for each function it appears in
   arch/x86/mm/fault.c: In function 'do_user_addr_fault':
   arch/x86/mm/fault.c:1407:8: error: 'ARCH_DEFAULT_PKEY' undeclared (first use in this function)
    1407 |        ARCH_DEFAULT_PKEY);
         |        ^~~~~~~~~~~~~~~~~


vim +/ARCH_DEFAULT_PKEY +940 arch/x86/mm/fault.c

   932	
   933	static void
   934	do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
   935		  vm_fault_t fault)
   936	{
   937		/* Kernel mode? Handle exceptions or die: */
   938		if (!user_mode(regs)) {
   939			kernelmode_fixup_or_oops(regs, error_code, address,
 > 940						 SIGBUS, BUS_ADRERR, ARCH_DEFAULT_PKEY);
   941			return;
   942		}
   943	
   944		/* User-space => ok to do another page fault: */
   945		if (is_prefetch(regs, error_code, address))
   946			return;
   947	
   948		sanitize_error_code(address, &error_code);
   949	
   950		if (fixup_vdso_exception(regs, X86_TRAP_PF, error_code, address))
   951			return;
   952	
   953		set_signal_archinfo(address, error_code);
   954	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32896 bytes --]

                 reply	other threads:[~2021-09-20 14:34 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=202109202245.APvuT8BX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bp@suse.de \
    --cc=kbuild-all@lists.01.org \
    --cc=liangjs@pku.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.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

Powered by JetHome