Skip to content

efi/x86: righten memory protections at runtime

Ard Biesheuvel linux-efi 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/mm: fix NX bit clearing issue in kernel_map_pages_in_pgdarch/x86/mm/pageattr.c+1 -70 replies
2/3efi/x86: don't map the entire kernel text RW for mixed modearch/x86/platform/efi/efi_64.c+2 -20 replies
3/3efi/x86: avoid RWX mappings for all of DRAMarch/x86/platform/efi/efi_64.c+13 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] efi/x86: righten memory protections at runtime

For historical reasons, the EFI startup code uses R/W/X mappings for most memory regions that it maps, and in the mixed mode case, it even maps all of DRAM R/W/X in its 1:1 mapping.

Let's tighten this a bit, and use the NX bit where possible, and ensure that at least the kernel text+rodata are not mapped RWX in the mixed mode case.

Cc Andy Lutomirski <[email protected]>
Cc Ingo Molnar <[email protected]>

Ard Biesheuvel (3):
x86/mm: fix NX bit clearing issue in kernel_map_pages_in_pgd efi/x86: don't map the entire kernel text RW for mixed mode efi/x86: avoid RWX mappings for all of DRAM

 arch/x86/mm/pageattr.c         |  8 +-------
 arch/x86/platform/efi/efi_64.c | 21 ++++++++++++++------
 2 files changed, 16 insertions(+), 13 deletions(-)
Signature · 1 line
2.17.1