aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/kexec-bzimage64.c
diff options
context:
space:
mode:
authorGravatar Ard Biesheuvel <ardb@kernel.org> 2020-01-13 18:22:38 +0100
committerGravatar Ingo Molnar <mingo@kernel.org> 2020-01-20 08:13:01 +0100
commit97bb9cdc32108036170d9d0d208257168f80d9e9 (patch)
treef5601b55d9c54358e5baf3d0b87f64b96b8cb893 /arch/x86/kernel/kexec-bzimage64.c
parentefi/x86: Don't map the entire kernel text RW for mixed mode (diff)
downloadlinux-97bb9cdc32108036170d9d0d208257168f80d9e9.tar.gz
linux-97bb9cdc32108036170d9d0d208257168f80d9e9.tar.bz2
linux-97bb9cdc32108036170d9d0d208257168f80d9e9.zip
efi/x86: Avoid RWX mappings for all of DRAM
The EFI code creates RWX mappings for all memory regions that are occupied after the stub completes, and in the mixed mode case, it even creates RWX mappings for all of the remaining DRAM as well. Let's try to avoid this, by setting the NX bit for all memory regions except the ones that are marked as EFI runtime services code [which means text+rodata+data in practice, so we cannot mark them read-only right away]. For cases of buggy firmware where boot services code is called during SetVirtualAddressMap(), map those regions with exec permissions as well - they will be unmapped in efi_free_boot_services(). Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20200113172245.27925-7-ardb@kernel.org
Diffstat (limited to 'arch/x86/kernel/kexec-bzimage64.c')
0 files changed, 0 insertions, 0 deletions