aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/desc_defs.h
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-09-07 15:15:35 +0200
committerBorislav Petkov <bp@suse.de>2020-09-07 22:44:43 +0200
commit097ee5b778b8970e1c2ed3ca1631b297d90acd61 (patch)
treee140daac57fe69cb91f597107a9e9db4fd8d83fd /arch/x86/include/asm/desc_defs.h
parentx86/head/64: Install a CPU bringup IDT (diff)
downloadlinux-dev-097ee5b778b8970e1c2ed3ca1631b297d90acd61.tar.xz
linux-dev-097ee5b778b8970e1c2ed3ca1631b297d90acd61.zip
x86/idt: Make IDT init functions static inlines
Move these two functions from kernel/idt.c to include/asm/desc.h: * init_idt_data() * idt_init_desc() These functions are needed to setup IDT entries very early and need to be called from head64.c. To be usable this early, these functions need to be compiled without instrumentation and the stack-protector feature. These features need to be kept enabled for kernel/idt.c, so head64.c must use its own versions. [ bp: Take Kees' suggested patch title and add his Rev-by. ] Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/20200907131613.12703-35-joro@8bytes.org
Diffstat (limited to 'arch/x86/include/asm/desc_defs.h')
-rw-r--r--arch/x86/include/asm/desc_defs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/desc_defs.h b/arch/x86/include/asm/desc_defs.h
index 5621fb3f2d1a..f7e7099af595 100644
--- a/arch/x86/include/asm/desc_defs.h
+++ b/arch/x86/include/asm/desc_defs.h
@@ -74,6 +74,13 @@ struct idt_bits {
p : 1;
} __attribute__((packed));
+struct idt_data {
+ unsigned int vector;
+ unsigned int segment;
+ struct idt_bits bits;
+ const void *addr;
+};
+
struct gate_struct {
u16 offset_low;
u16 segment;