Skip to content

efistub/x86 changes for secure boot

Ard Biesheuvel linux-efi stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18arm64: efi: Limit allocations to 48-bit addressable physical regionarch/arm64/include/asm/efi.h drivers/firmware/efi/libstub/alignedmem.c drivers/firmware/efi/libstub/arm64-stub.c +3 more+13 -30 replies
2/18efi: efivars: prevent double registrationdrivers/firmware/efi/vars.c+11 -20 replies
3/18x86/efistub: Simplify and clean up handover entry codeDocumentation/x86/boot.rst arch/x86/boot/compressed/efi_mixed.S arch/x86/boot/compressed/head_32.S +2 more+31 -360 replies
4/18x86/decompressor: Avoid magic offsets for EFI handover entrypointarch/x86/boot/compressed/efi_mixed.S arch/x86/boot/compressed/head_64.S+19 -190 replies
5/18x86/efistub: Clear BSS in EFI handover protocol entrypointarch/x86/boot/compressed/efi_mixed.S drivers/firmware/efi/libstub/x86-stub.c+24 -30 replies
6/18x86/decompressor: Move global symbol references to C codearch/x86/boot/compressed/head_32.S arch/x86/boot/compressed/head_64.S arch/x86/boot/compressed/misc.c+11 -230 replies
7/18efi/libstub: Add memory attribute protocol definitionsarch/x86/include/asm/efi.h drivers/firmware/efi/libstub/efistub.h include/linux/efi.h+28 -00 replies
8/18efi/libstub: Add limit argument to efi_random_alloc()drivers/firmware/efi/libstub/arm64-stub.c drivers/firmware/efi/libstub/efistub.h drivers/firmware/efi/libstub/randomalloc.c+8 -60 replies
9/18x86/efistub: Perform 4/5 level paging switch from the stubdrivers/firmware/efi/libstub/Makefile drivers/firmware/efi/libstub/efi-stub-helper.c drivers/firmware/efi/libstub/efistub.h +3 more+130 -260 replies
10/18x86/decompressor: Factor out kernel decompression and relocationarch/x86/boot/compressed/misc.c arch/x86/include/asm/boot.h+32 -50 replies
11/18x86/efistub: Prefer EFI memory attributes protocol over DXE servicesdrivers/firmware/efi/libstub/x86-stub.c+21 -80 replies
12/18x86/efistub: Perform SNP feature test while running in the firmwarearch/x86/boot/compressed/sev.c arch/x86/include/asm/sev.h drivers/firmware/efi/libstub/x86-stub.c+88 -460 replies
13/18x86/efistub: Avoid legacy decompressor when doing EFI bootarch/x86/boot/compressed/Makefile arch/x86/boot/compressed/efi_mixed.S arch/x86/boot/compressed/head_32.S +4 more+84 -1910 replies
14/18efi/x86: Avoid physical KASLR on older Dell systemsdrivers/firmware/efi/libstub/x86-stub.c+24 -70 replies
15/18x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDRdrivers/firmware/efi/libstub/arm64-stub.c drivers/firmware/efi/libstub/efistub.h drivers/firmware/efi/libstub/randomalloc.c +1 more+11 -70 replies
16/18x86/boot: Rename conflicting 'boot_params' pointer to 'boot_params_ptr'arch/x86/boot/compressed/acpi.c arch/x86/boot/compressed/cmdline.c arch/x86/boot/compressed/ident_map_64.c +6 more+45 -440 replies
17/18x86/boot: efistub: Assign global boot_params variabledrivers/firmware/efi/libstub/x86-stub.c+2 -00 replies
18/18efi/x86: Fix the missing KASLR_FLAG bit in boot_params->hdr.loadflagsdrivers/firmware/efi/libstub/x86-stub.c+2 -00 replies

Reviews trailers per patch

1 of 18 patches has a Reviewed-by or Acked-by.

PatchMario LimoncielloKirill A. Shutemov
1/18
2/18
3/18
4/18
5/18
6/18
7/18T-b
8/18
9/18A-b
10/18
11/18
12/18
13/18
14/18
15/18
16/18
17/18
18/18

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH stable-v6.1 00/18] efistub/x86 changes for secure boot

From: Ard Biesheuvel <[email protected]>

These are the remaining patches that bring v6.1 in sync with v6.6 in terms of support for 4k section alignment and strict separation of executable and writable mappings. More details in [0].

[0] https://lkml.kernel.org/r/CAMj1kXE5y%2B6Fef1SqsePO1p8eGEL_qKR9ZkNPNKb-y6P8-7YmQ%40mail.gmail.com

Ard Biesheuvel (15):
arm64: efi: Limit allocations to 48-bit addressable physical region x86/efistub: Simplify and clean up handover entry code x86/decompressor: Avoid magic offsets for EFI handover entrypoint x86/efistub: Clear BSS in EFI handover protocol entrypoint x86/decompressor: Move global symbol references to C code efi/libstub: Add limit argument to efi_random_alloc() x86/efistub: Perform 4/5 level paging switch from the stub x86/decompressor: Factor out kernel decompression and relocation x86/efistub: Prefer EFI memory attributes protocol over DXE services x86/efistub: Perform SNP feature test while running in the firmware x86/efistub: Avoid legacy decompressor when doing EFI boot efi/x86: Avoid physical KASLR on older Dell systems x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR x86/boot: Rename conflicting 'boot_params' pointer to
'boot_params_ptr'
x86/boot: efistub: Assign global boot_params variable

Evgeniy Baskov (1):
efi/libstub: Add memory attribute protocol definitions

Johan Hovold (1):
efi: efivars: prevent double registration

Yuntao Wang (1):
efi/x86: Fix the missing KASLR_FLAG bit in boot_params->hdr.loadflags

 Documentation/x86/boot.rst                     |   2 +-
 arch/arm64/include/asm/efi.h                   |   1 +
 arch/x86/boot/compressed/Makefile              |   5 +
 arch/x86/boot/compressed/acpi.c                |  14 +-
 arch/x86/boot/compressed/cmdline.c             |   4 +-
 arch/x86/boot/compressed/efi_mixed.S           | 107 +++----
 arch/x86/boot/compressed/head_32.S             |  32 ---
 arch/x86/boot/compressed/head_64.S             |  63 +----
 arch/x86/boot/compressed/ident_map_64.c        |   7 +-
 arch/x86/boot/compressed/kaslr.c               |  26 +-
 arch/x86/boot/compressed/misc.c                |  69 +++--
 arch/x86/boot/compressed/misc.h                |   1 -
 arch/x86/boot/compressed/pgtable_64.c          |   9 +-
 arch/x86/boot/compressed/sev.c                 | 114 ++++----
 arch/x86/include/asm/boot.h                    |  10 +
 arch/x86/include/asm/efi.h                     |  14 +-
 arch/x86/include/asm/sev.h                     |   7 +
 drivers/firmware/efi/libstub/Makefile          |   1 +
 drivers/firmware/efi/libstub/alignedmem.c      |   2 +
 drivers/firmware/efi/libstub/arm64-stub.c      |   7 +-
 drivers/firmware/efi/libstub/efi-stub-helper.c |   2 +
 drivers/firmware/efi/libstub/efistub.h         |  28 +-
 drivers/firmware/efi/libstub/mem.c             |   2 +
 drivers/firmware/efi/libstub/randomalloc.c     |  14 +-
 drivers/firmware/efi/libstub/x86-5lvl.c        |  95 +++++++
 drivers/firmware/efi/libstub/x86-stub.c        | 295 +++++++++++---------
 drivers/firmware/efi/libstub/x86-stub.h        |  17 ++
 drivers/firmware/efi/vars.c                    |  13 +-
 include/linux/efi.h                            |   1 +
 29 files changed, 560 insertions(+), 402 deletions(-)
 create mode 100644 drivers/firmware/efi/libstub/x86-5lvl.c
 create mode 100644 drivers/firmware/efi/libstub/x86-stub.h
Signature · 1 line
2.44.0.278.ge034bb2e1d-goog