diff options
author | Joerg Roedel <jroedel@suse.de> | 2020-09-07 16:15:16 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-09-07 20:45:25 +0300 |
commit | 8b0d3b3b41ab6f14f1ce6d4a6b1c5f60b825123f (patch) | |
tree | 44b616e876f8bf3aa0d8b26f1e29a9e0aa0a50ae /arch/x86/boot/compressed/misc.h | |
parent | 5f2bb01682b7b067783207994c7b8a3dbeb1cd83 (diff) | |
download | linux-8b0d3b3b41ab6f14f1ce6d4a6b1c5f60b825123f.tar.xz |
x86/boot/compressed/64: Add page-fault handler
Install a page-fault handler to add an identity mapping to addresses
not yet mapped. Also do some checking whether the error code is sane.
This makes non SEV-ES machines use the exception handling
infrastructure in the pre-decompressions boot code too, making it less
likely to break in the future.
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-16-joro@8bytes.org
Diffstat (limited to 'arch/x86/boot/compressed/misc.h')
-rw-r--r-- | arch/x86/boot/compressed/misc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index 98b7a1df9c59..f0e199174c5f 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -37,6 +37,9 @@ #define memptr unsigned #endif +/* boot/compressed/vmlinux start and end markers */ +extern char _head[], _end[]; + /* misc.c */ extern memptr free_mem_ptr; extern memptr free_mem_end_ptr; @@ -146,4 +149,7 @@ extern pteval_t __default_kernel_pte_mask; extern gate_desc boot_idt[BOOT_IDT_ENTRIES]; extern struct desc_ptr boot_idt_desc; +/* IDT Entry Points */ +void boot_page_fault(void); + #endif /* BOOT_COMPRESSED_MISC_H */ |