x86/boot/compressed/64: Add page-fault handler
authorJoerg Roedel <jroedel@suse.de>
Mon, 7 Sep 2020 13:15:16 +0000 (15:15 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 7 Sep 2020 17:45:25 +0000 (19:45 +0200)
commit8b0d3b3b41ab6f14f1ce6d4a6b1c5f60b825123f
tree44b616e876f8bf3aa0d8b26f1e29a9e0aa0a50ae
parent5f2bb01682b7b067783207994c7b8a3dbeb1cd83
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
arch/x86/boot/compressed/ident_map_64.c
arch/x86/boot/compressed/idt_64.c
arch/x86/boot/compressed/idt_handlers_64.S
arch/x86/boot/compressed/misc.h