]> git.baikalelectronics.ru Git - kernel.git/commit
efi/x86: Revert struct layout change to fix kexec boot regression
authorArd Biesheuvel <ardb@kernel.org>
Fri, 10 Apr 2020 07:43:20 +0000 (09:43 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 14 Apr 2020 06:32:17 +0000 (08:32 +0200)
commitd6d9128a91804214e53f1109e7b203aeaedce6a6
tree64895ec738952c9e196d845a74c3272d433ba551
parent6d70405f555b59b6deadffc92c49aa743929ab0d
efi/x86: Revert struct layout change to fix kexec boot regression

Commit

  4d257fad4ce504 ("efi/x86: Remove runtime table address from kexec EFI setup data")

removed the code that retrieves the non-remapped UEFI runtime services
pointer from the data structure provided by kexec, as it was never really
needed on the kexec boot path: mapping the runtime services table at its
non-remapped address is only needed when calling SetVirtualAddressMap(),
which never happens during a kexec boot in the first place.

However, dropping the 'runtime' member from struct efi_setup_data was a
mistake. That struct is shared ABI between the kernel and the kexec tooling
for x86, and so we cannot simply change its layout. So let's put back the
removed field, but call it 'unused' to reflect the fact that we never look
at its contents. While at it, add a comment to remind our future selves
that the layout is external ABI.

Fixes: 4d257fad4ce504 ("efi/x86: Remove runtime table address from kexec EFI setup data")
Reported-by: Theodore Ts'o <tytso@mit.edu>
Tested-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/efi.h