diff options
author | Joerg Roedel <jroedel@suse.de> | 2020-09-07 15:15:46 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-09-09 11:33:19 +0200 |
commit | a13644f3a53de4e95a7bce6459f834e832ea44c5 (patch) | |
tree | 9c5cb65710578399714129dd0482ee18e7ae1238 /arch/x86/include/asm/proto.h | |
parent | x86/dumpstack/64: Add noinstr version of get_stack_info() (diff) | |
download | linux-a13644f3a53de4e95a7bce6459f834e832ea44c5.tar.xz linux-a13644f3a53de4e95a7bce6459f834e832ea44c5.zip |
x86/entry/64: Add entry code for #VC handler
The #VC handler needs special entry code because:
1. It runs on an IST stack
2. It needs to be able to handle nested #VC exceptions
To make this work, the entry code is implemented to pretend it doesn't
use an IST stack. When entered from user-mode or early SYSCALL entry
path it switches to the task stack. If entered from kernel-mode it tries
to switch back to the previous stack in the IRET frame.
The stack found in the IRET frame is validated first, and if it is not
safe to use it for the #VC handler, the code will switch to a
fall-back stack (the #VC2 IST stack). From there, it can cause nested
exceptions again.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200907131613.12703-46-joro@8bytes.org
Diffstat (limited to 'arch/x86/include/asm/proto.h')
-rw-r--r-- | arch/x86/include/asm/proto.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/proto.h b/arch/x86/include/asm/proto.h index 28996fe19301..2c35f1c01a2d 100644 --- a/arch/x86/include/asm/proto.h +++ b/arch/x86/include/asm/proto.h @@ -10,6 +10,7 @@ void syscall_init(void); #ifdef CONFIG_X86_64 void entry_SYSCALL_64(void); +void entry_SYSCALL_64_safe_stack(void); long do_arch_prctl_64(struct task_struct *task, int option, unsigned long arg2); #endif |