linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] x86/fault: Fix wrong signal when vsyscall fails with pkey
@ 2021-07-30  3:01 Jiashuo Liang
  2021-08-23 14:55 ` Dave Hansen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jiashuo Liang @ 2021-07-30  3:01 UTC (permalink / raw)
  To: Dave Hansen, Andy Lutomirski, Peter Zijlstra, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, x86, H. Peter Anvin
  Cc: linux-kernel, Jiashuo Liang

The function __bad_area_nosemaphore() calls kernelmode_fixup_or_oops() with
parameter "signal" being "pkey", which will send a signal numbered "pkey".

This bug appears when the kernel fail to access user-given memory pages
that are protected by pkey, so it can go through the do_user_addr_fault()
path and pass the !user_mode() check in __bad_area_nosemaphore(). Most
cases will simply run the kernel fixup code to make an -EFAULT. But when
another condition current->thread.sig_on_uaccess_err is met, which is
only used to emulate vsyscall, we will generate the wrong signal.

A new parameter "pkey" is added to kernelmode_fixup_or_oops() to fix it.

Fixes: 5042d40a264c ("x86/fault: Bypass no_context() for implicit kernel faults from usermode")
Signed-off-by: Jiashuo Liang <liangjs@pku.edu.cn>
---

Changes in v2:
  - Use ARCH_DEFAULT_PKEY instead of 0 for unused pkey parameter.

 arch/x86/mm/fault.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index b2eefdefc108..84a2c8c4af73 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -710,7 +710,8 @@ page_fault_oops(struct pt_regs *regs, unsigned long error_code,
 
 static noinline void
 kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
-			 unsigned long address, int signal, int si_code)
+			 unsigned long address, int signal, int si_code,
+			 u32 pkey)
 {
 	WARN_ON_ONCE(user_mode(regs));
 
@@ -735,8 +736,12 @@ kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
 
 			set_signal_archinfo(address, error_code);
 
-			/* XXX: hwpoison faults will set the wrong code. */
-			force_sig_fault(signal, si_code, (void __user *)address);
+			if (si_code == SEGV_PKUERR) {
+				force_sig_pkuerr((void __user *)address, pkey);
+			} else {
+				/* XXX: hwpoison faults will set the wrong code. */
+				force_sig_fault(signal, si_code, (void __user *)address);
+			}
 		}
 
 		/*
@@ -798,7 +803,8 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
 	struct task_struct *tsk = current;
 
 	if (!user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, pkey, si_code);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 SIGSEGV, si_code, pkey);
 		return;
 	}
 
@@ -930,7 +936,8 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
 {
 	/* Kernel mode? Handle exceptions or die: */
 	if (!user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, SIGBUS, BUS_ADRERR);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 SIGBUS, BUS_ADRERR, ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1396,7 +1403,8 @@ void do_user_addr_fault(struct pt_regs *regs,
 		 */
 		if (!user_mode(regs))
 			kernelmode_fixup_or_oops(regs, error_code, address,
-						 SIGBUS, BUS_ADRERR);
+						 SIGBUS, BUS_ADRERR,
+						 ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1416,7 +1424,8 @@ void do_user_addr_fault(struct pt_regs *regs,
 		return;
 
 	if (fatal_signal_pending(current) && !user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, 0, 0);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 0, 0, ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1424,7 +1433,8 @@ void do_user_addr_fault(struct pt_regs *regs,
 		/* Kernel mode? Handle exceptions or die: */
 		if (!user_mode(regs)) {
 			kernelmode_fixup_or_oops(regs, error_code, address,
-						 SIGSEGV, SEGV_MAPERR);
+						 SIGSEGV, SEGV_MAPERR,
+						 ARCH_DEFAULT_PKEY);
 			return;
 		}
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] x86/fault: Fix wrong signal when vsyscall fails with pkey
  2021-07-30  3:01 [PATCH v2] x86/fault: Fix wrong signal when vsyscall fails with pkey Jiashuo Liang
@ 2021-08-23 14:55 ` Dave Hansen
  2021-09-19  4:39   ` Jiashuo Liang
  2021-09-20 10:42 ` [tip: x86/urgent] " tip-bot2 for Jiashuo Liang
  2021-09-20 20:37 ` tip-bot2 for Jiashuo Liang
  2 siblings, 1 reply; 6+ messages in thread
From: Dave Hansen @ 2021-08-23 14:55 UTC (permalink / raw)
  To: Jiashuo Liang, Dave Hansen, Andy Lutomirski, Peter Zijlstra,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin
  Cc: linux-kernel

On 7/29/21 8:01 PM, Jiashuo Liang wrote:
> The function __bad_area_nosemaphore() calls kernelmode_fixup_or_oops() with
> parameter "signal" being "pkey", which will send a signal numbered "pkey".
> 
> This bug appears when the kernel fail to access user-given memory pages
> that are protected by pkey, so it can go through the do_user_addr_fault()
> path and pass the !user_mode() check in __bad_area_nosemaphore(). Most
> cases will simply run the kernel fixup code to make an -EFAULT. But when
> another condition current->thread.sig_on_uaccess_err is met, which is
> only used to emulate vsyscall, we will generate the wrong signal.
> 
> A new parameter "pkey" is added to kernelmode_fixup_or_oops() to fix it.
> 
> Fixes: 5042d40a264c ("x86/fault: Bypass no_context() for implicit kernel faults from usermode")
> Signed-off-by: Jiashuo Liang <liangjs@pku.edu.cn>

This is pretty obscure, only affecting vsyscall emulation, but:

Acked-by: Dave Hansen <dave.hansen@linux.intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] x86/fault: Fix wrong signal when vsyscall fails with pkey
  2021-08-23 14:55 ` Dave Hansen
@ 2021-09-19  4:39   ` Jiashuo Liang
  0 siblings, 0 replies; 6+ messages in thread
From: Jiashuo Liang @ 2021-09-19  4:39 UTC (permalink / raw)
  To: dave.hansen, bp, dave.hansen, hpa, linux-kernel, luto, mingo,
	peterz, tglx, x86
  Cc: liangjs

On Mon, 2021-08-23 at 07:55 -0700, Dave Hansen wrote:
> On 7/29/21 8:01 PM, Jiashuo Liang wrote:
>> The function __bad_area_nosemaphore() calls kernelmode_fixup_or_oops() with
>> parameter "signal" being "pkey", which will send a signal numbered "pkey".
>>
>> This bug appears when the kernel fail to access user-given memory pages
>> that are protected by pkey, so it can go through the do_user_addr_fault()
>> path and pass the !user_mode() check in __bad_area_nosemaphore(). Most
>> cases will simply run the kernel fixup code to make an -EFAULT. But when
>> another condition current->thread.sig_on_uaccess_err is met, which is
>> only used to emulate vsyscall, we will generate the wrong signal.
>>
>> A new parameter "pkey" is added to kernelmode_fixup_or_oops() to fix it.
>>
>> Fixes: 5042d40a264c ("x86/fault: Bypass no_context() for implicit kernel faults from usermode")
>> Signed-off-by: Jiashuo Liang <liangjs@pku.edu.cn>
>
> This is pretty obscure, only affecting vsyscall emulation, but:
>
> Acked-by: Dave Hansen <dave.hansen@linux.intel.com>

Ping... Is there anyone reviewing/committing this patch?

Thanks!


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip: x86/urgent] x86/fault: Fix wrong signal when vsyscall fails with pkey
  2021-07-30  3:01 [PATCH v2] x86/fault: Fix wrong signal when vsyscall fails with pkey Jiashuo Liang
  2021-08-23 14:55 ` Dave Hansen
@ 2021-09-20 10:42 ` tip-bot2 for Jiashuo Liang
  2021-09-20 14:43   ` Borislav Petkov
  2021-09-20 20:37 ` tip-bot2 for Jiashuo Liang
  2 siblings, 1 reply; 6+ messages in thread
From: tip-bot2 for Jiashuo Liang @ 2021-09-20 10:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Jiashuo Liang, Borislav Petkov, Dave Hansen, x86, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     0829d0b6bf0fb3453608798442deaf00c4a1abec
Gitweb:        https://git.kernel.org/tip/0829d0b6bf0fb3453608798442deaf00c4a1abec
Author:        Jiashuo Liang <liangjs@pku.edu.cn>
AuthorDate:    Fri, 30 Jul 2021 11:01:52 +08:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Mon, 20 Sep 2021 12:31:06 +02:00

x86/fault: Fix wrong signal when vsyscall fails with pkey

The function __bad_area_nosemaphore() calls kernelmode_fixup_or_oops()
with the parameter @signal being actually @pkey, which will send a
signal numbered with the argument in @pkey.

This bug can be triggered when the kernel fails to access user-given
memory pages that are protected by a pkey, so it can go down the
do_user_addr_fault() path and pass the !user_mode() check in
__bad_area_nosemaphore().

Most cases will simply run the kernel fixup code to make an -EFAULT. But
when another condition current->thread.sig_on_uaccess_err is met, which
is only used to emulate vsyscall, the kernel will generate the wrong
signal.

Add a new parameter @pkey to kernelmode_fixup_or_oops() to fix this.

 [ bp: Massage commit message. ]

Fixes: 5042d40a264c ("x86/fault: Bypass no_context() for implicit kernel faults from usermode")
Signed-off-by: Jiashuo Liang <liangjs@pku.edu.cn>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lkml.kernel.org/r/20210730030152.249106-1-liangjs@pku.edu.cn
---
 arch/x86/mm/fault.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index b2eefde..84a2c8c 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -710,7 +710,8 @@ oops:
 
 static noinline void
 kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
-			 unsigned long address, int signal, int si_code)
+			 unsigned long address, int signal, int si_code,
+			 u32 pkey)
 {
 	WARN_ON_ONCE(user_mode(regs));
 
@@ -735,8 +736,12 @@ kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
 
 			set_signal_archinfo(address, error_code);
 
-			/* XXX: hwpoison faults will set the wrong code. */
-			force_sig_fault(signal, si_code, (void __user *)address);
+			if (si_code == SEGV_PKUERR) {
+				force_sig_pkuerr((void __user *)address, pkey);
+			} else {
+				/* XXX: hwpoison faults will set the wrong code. */
+				force_sig_fault(signal, si_code, (void __user *)address);
+			}
 		}
 
 		/*
@@ -798,7 +803,8 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
 	struct task_struct *tsk = current;
 
 	if (!user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, pkey, si_code);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 SIGSEGV, si_code, pkey);
 		return;
 	}
 
@@ -930,7 +936,8 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
 {
 	/* Kernel mode? Handle exceptions or die: */
 	if (!user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, SIGBUS, BUS_ADRERR);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 SIGBUS, BUS_ADRERR, ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1396,7 +1403,8 @@ good_area:
 		 */
 		if (!user_mode(regs))
 			kernelmode_fixup_or_oops(regs, error_code, address,
-						 SIGBUS, BUS_ADRERR);
+						 SIGBUS, BUS_ADRERR,
+						 ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1416,7 +1424,8 @@ good_area:
 		return;
 
 	if (fatal_signal_pending(current) && !user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, 0, 0);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 0, 0, ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1424,7 +1433,8 @@ good_area:
 		/* Kernel mode? Handle exceptions or die: */
 		if (!user_mode(regs)) {
 			kernelmode_fixup_or_oops(regs, error_code, address,
-						 SIGSEGV, SEGV_MAPERR);
+						 SIGSEGV, SEGV_MAPERR,
+						 ARCH_DEFAULT_PKEY);
 			return;
 		}
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [tip: x86/urgent] x86/fault: Fix wrong signal when vsyscall fails with pkey
  2021-09-20 10:42 ` [tip: x86/urgent] " tip-bot2 for Jiashuo Liang
@ 2021-09-20 14:43   ` Borislav Petkov
  0 siblings, 0 replies; 6+ messages in thread
From: Borislav Petkov @ 2021-09-20 14:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-tip-commits, Jiashuo Liang, Dave Hansen, x86

On Mon, Sep 20, 2021 at 10:42:39AM -0000, tip-bot2 for Jiashuo Liang wrote:
> The following commit has been merged into the x86/urgent branch of tip:
> 
> Commit-ID:     0829d0b6bf0fb3453608798442deaf00c4a1abec
> Gitweb:        https://git.kernel.org/tip/0829d0b6bf0fb3453608798442deaf00c4a1abec
> Author:        Jiashuo Liang <liangjs@pku.edu.cn>
> AuthorDate:    Fri, 30 Jul 2021 11:01:52 +08:00
> Committer:     Borislav Petkov <bp@suse.de>
> CommitterDate: Mon, 20 Sep 2021 12:31:06 +02:00
> 
> x86/fault: Fix wrong signal when vsyscall fails with pkey
> 
> The function __bad_area_nosemaphore() calls kernelmode_fixup_or_oops()
> with the parameter @signal being actually @pkey, which will send a
> signal numbered with the argument in @pkey.
> 
> This bug can be triggered when the kernel fails to access user-given
> memory pages that are protected by a pkey, so it can go down the
> do_user_addr_fault() path and pass the !user_mode() check in
> __bad_area_nosemaphore().
> 
> Most cases will simply run the kernel fixup code to make an -EFAULT. But
> when another condition current->thread.sig_on_uaccess_err is met, which
> is only used to emulate vsyscall, the kernel will generate the wrong
> signal.
> 
> Add a new parameter @pkey to kernelmode_fixup_or_oops() to fix this.
> 
>  [ bp: Massage commit message. ]
> 
> Fixes: 5042d40a264c ("x86/fault: Bypass no_context() for implicit kernel faults from usermode")
> Signed-off-by: Jiashuo Liang <liangjs@pku.edu.cn>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
> Link: https://lkml.kernel.org/r/20210730030152.249106-1-liangjs@pku.edu.cn
> ---
>  arch/x86/mm/fault.c | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)

Zapping it again because the 0day bot found some randconfig which fails:

https://lkml.kernel.org/r/202109202245.APvuT8BX-lkp@intel.com

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip: x86/urgent] x86/fault: Fix wrong signal when vsyscall fails with pkey
  2021-07-30  3:01 [PATCH v2] x86/fault: Fix wrong signal when vsyscall fails with pkey Jiashuo Liang
  2021-08-23 14:55 ` Dave Hansen
  2021-09-20 10:42 ` [tip: x86/urgent] " tip-bot2 for Jiashuo Liang
@ 2021-09-20 20:37 ` tip-bot2 for Jiashuo Liang
  2 siblings, 0 replies; 6+ messages in thread
From: tip-bot2 for Jiashuo Liang @ 2021-09-20 20:37 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: kernel test robot, Jiashuo Liang, Borislav Petkov, Dave Hansen,
	x86, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     d4ffd5df9d18031b6a53f934388726775b4452d3
Gitweb:        https://git.kernel.org/tip/d4ffd5df9d18031b6a53f934388726775b4452d3
Author:        Jiashuo Liang <liangjs@pku.edu.cn>
AuthorDate:    Fri, 30 Jul 2021 11:01:52 +08:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Mon, 20 Sep 2021 22:28:47 +02:00

x86/fault: Fix wrong signal when vsyscall fails with pkey

The function __bad_area_nosemaphore() calls kernelmode_fixup_or_oops()
with the parameter @signal being actually @pkey, which will send a
signal numbered with the argument in @pkey.

This bug can be triggered when the kernel fails to access user-given
memory pages that are protected by a pkey, so it can go down the
do_user_addr_fault() path and pass the !user_mode() check in
__bad_area_nosemaphore().

Most cases will simply run the kernel fixup code to make an -EFAULT. But
when another condition current->thread.sig_on_uaccess_err is met, which
is only used to emulate vsyscall, the kernel will generate the wrong
signal.

Add a new parameter @pkey to kernelmode_fixup_or_oops() to fix this.

 [ bp: Massage commit message, fix build error as reported by the 0day
   bot: https://lkml.kernel.org/r/202109202245.APvuT8BX-lkp@intel.com ]

Fixes: 5042d40a264c ("x86/fault: Bypass no_context() for implicit kernel faults from usermode")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jiashuo Liang <liangjs@pku.edu.cn>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lkml.kernel.org/r/20210730030152.249106-1-liangjs@pku.edu.cn
---
 arch/x86/include/asm/pkeys.h |  2 --
 arch/x86/mm/fault.c          | 26 ++++++++++++++++++--------
 include/linux/pkeys.h        |  2 ++
 3 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/asm/pkeys.h b/arch/x86/include/asm/pkeys.h
index 5c7bcaa..1d5f14a 100644
--- a/arch/x86/include/asm/pkeys.h
+++ b/arch/x86/include/asm/pkeys.h
@@ -2,8 +2,6 @@
 #ifndef _ASM_X86_PKEYS_H
 #define _ASM_X86_PKEYS_H
 
-#define ARCH_DEFAULT_PKEY	0
-
 /*
  * If more than 16 keys are ever supported, a thorough audit
  * will be necessary to ensure that the types that store key
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index b2eefde..84a2c8c 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -710,7 +710,8 @@ oops:
 
 static noinline void
 kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
-			 unsigned long address, int signal, int si_code)
+			 unsigned long address, int signal, int si_code,
+			 u32 pkey)
 {
 	WARN_ON_ONCE(user_mode(regs));
 
@@ -735,8 +736,12 @@ kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
 
 			set_signal_archinfo(address, error_code);
 
-			/* XXX: hwpoison faults will set the wrong code. */
-			force_sig_fault(signal, si_code, (void __user *)address);
+			if (si_code == SEGV_PKUERR) {
+				force_sig_pkuerr((void __user *)address, pkey);
+			} else {
+				/* XXX: hwpoison faults will set the wrong code. */
+				force_sig_fault(signal, si_code, (void __user *)address);
+			}
 		}
 
 		/*
@@ -798,7 +803,8 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
 	struct task_struct *tsk = current;
 
 	if (!user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, pkey, si_code);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 SIGSEGV, si_code, pkey);
 		return;
 	}
 
@@ -930,7 +936,8 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
 {
 	/* Kernel mode? Handle exceptions or die: */
 	if (!user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, SIGBUS, BUS_ADRERR);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 SIGBUS, BUS_ADRERR, ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1396,7 +1403,8 @@ good_area:
 		 */
 		if (!user_mode(regs))
 			kernelmode_fixup_or_oops(regs, error_code, address,
-						 SIGBUS, BUS_ADRERR);
+						 SIGBUS, BUS_ADRERR,
+						 ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1416,7 +1424,8 @@ good_area:
 		return;
 
 	if (fatal_signal_pending(current) && !user_mode(regs)) {
-		kernelmode_fixup_or_oops(regs, error_code, address, 0, 0);
+		kernelmode_fixup_or_oops(regs, error_code, address,
+					 0, 0, ARCH_DEFAULT_PKEY);
 		return;
 	}
 
@@ -1424,7 +1433,8 @@ good_area:
 		/* Kernel mode? Handle exceptions or die: */
 		if (!user_mode(regs)) {
 			kernelmode_fixup_or_oops(regs, error_code, address,
-						 SIGSEGV, SEGV_MAPERR);
+						 SIGSEGV, SEGV_MAPERR,
+						 ARCH_DEFAULT_PKEY);
 			return;
 		}
 
diff --git a/include/linux/pkeys.h b/include/linux/pkeys.h
index 6beb26b..86be8bf 100644
--- a/include/linux/pkeys.h
+++ b/include/linux/pkeys.h
@@ -4,6 +4,8 @@
 
 #include <linux/mm.h>
 
+#define ARCH_DEFAULT_PKEY	0
+
 #ifdef CONFIG_ARCH_HAS_PKEYS
 #include <asm/pkeys.h>
 #else /* ! CONFIG_ARCH_HAS_PKEYS */

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-20 20:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30  3:01 [PATCH v2] x86/fault: Fix wrong signal when vsyscall fails with pkey Jiashuo Liang
2021-08-23 14:55 ` Dave Hansen
2021-09-19  4:39   ` Jiashuo Liang
2021-09-20 10:42 ` [tip: x86/urgent] " tip-bot2 for Jiashuo Liang
2021-09-20 14:43   ` Borislav Petkov
2021-09-20 20:37 ` tip-bot2 for Jiashuo Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).