aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-03-22 17:01:45 +0100
committerArd Biesheuvel <ardb@kernel.org>2024-03-24 09:28:33 +0100
commitdf7ecce842b846a04d087ba85fdb79a90e26a1b0 (patch)
treebf7990810494e090c3e27a970ae96d07ceabe26f /mm
parentcefcd4fe2e3aaf792c14c9e56dab89e3d7a65d02 (diff)
x86/efistub: Don't clear BSS twice in mixed mode
Clearing BSS should only be done once, at the very beginning. efi_pe_entry() is the entrypoint from the firmware, which may not clear BSS and so it is done explicitly. However, efi_pe_entry() is also used as an entrypoint by the mixed mode startup code, in which case BSS will already have been cleared, and doing it again at this point will corrupt global variables holding the firmware's GDT/IDT and segment selectors. So make the memset() conditional on whether the EFI stub is running in native mode. Fixes: b3810c5a2cc4a666 ("x86/efistub: Clear decompressor BSS in native EFI entrypoint") Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions