]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86/kexec: Add relocate_kernel() debugging support: Load a GDT
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 12 Mar 2025 14:34:13 +0000 (14:34 +0000)
committerIngo Molnar <mingo@kernel.org>
Fri, 14 Mar 2025 10:01:53 +0000 (11:01 +0100)
commitb25eb5f5e419b81f124d5ba2abaaacf1948fb97e
treefab184c3c2092dfc7ead67ff54e9b04270babb61
parente27dffba1b1d6c047b48c325adcb1342d3e3fa69
x86/kexec: Add relocate_kernel() debugging support: Load a GDT

There are some failure modes which lead to triple-faults in the
relocate_kernel() function, which is fairly much undebuggable
for normal mortals.

Adding a GDT in the relocate_kernel() environment is step 1 towards
being able to catch faults and do something more useful.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250312144257.2348250-2-dwmw2@infradead.org
arch/x86/kernel/relocate_kernel_64.S