x86/idt: Make IDT init functions static inlines
authorJoerg Roedel <jroedel@suse.de>
Mon, 7 Sep 2020 13:15:35 +0000 (15:15 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 7 Sep 2020 20:44:43 +0000 (22:44 +0200)
commit097ee5b778b8970e1c2ed3ca1631b297d90acd61
treee140daac57fe69cb91f597107a9e9db4fd8d83fd
parentf5963ba7a45fc6ff298a34976064354be437e1d8
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
arch/x86/include/asm/desc.h
arch/x86/include/asm/desc_defs.h
arch/x86/kernel/idt.c