summaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/misc.h
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2021-03-10 11:43:19 +0300
committerBorislav Petkov <bp@suse.de>2021-03-18 18:44:36 +0300
commitb099155e2df7dadf8b1ad9828158b89f5639f654 (patch)
treefcacfa3bded6ffcd9839e2c8690e20f59d973db1 /arch/x86/boot/compressed/misc.h
parentafb4a37778491eae010a43edebea32ff2d45f01c (diff)
downloadlinux-b099155e2df7dadf8b1ad9828158b89f5639f654.tar.xz
x86/boot/compressed/64: Cleanup exception handling before booting kernel
Disable the exception handling before booting the kernel to make sure any exceptions that happen during early kernel boot are not directed to the pre-decompression code. Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210312123824.306-2-joro@8bytes.org
Diffstat (limited to 'arch/x86/boot/compressed/misc.h')
-rw-r--r--arch/x86/boot/compressed/misc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index 901ea5ebec22..e5612f035498 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -155,6 +155,12 @@ extern pteval_t __default_kernel_pte_mask;
extern gate_desc boot_idt[BOOT_IDT_ENTRIES];
extern struct desc_ptr boot_idt_desc;
+#ifdef CONFIG_X86_64
+void cleanup_exception_handling(void);
+#else
+static inline void cleanup_exception_handling(void) { }
+#endif
+
/* IDT Entry Points */
void boot_page_fault(void);
void boot_stage1_vc(void);