Skip to content

x86/efistub backports

Ard Biesheuvel stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23x86/efi: Drop EFI stub .bss from .data sectionarch/x86/boot/compressed/vmlinux.lds.S drivers/firmware/efi/libstub/Makefile+0 -80 replies
2/23x86/efi: Disregard setup header of loaded imagedrivers/firmware/efi/libstub/x86-stub.c+6 -400 replies
3/23x86/efistub: Reinstate soft limit for initrd loadingdrivers/firmware/efi/libstub/x86-stub.c+1 -00 replies
4/23x86/efi: Drop alignment flags from PE section headersarch/x86/boot/header.S+4 -80 replies
5/23x86/boot: Remove the 'bugger off' messagearch/x86/boot/header.S arch/x86/boot/setup.ld+4 -520 replies
6/23x86/boot: Omit compression buffer from PE/COFF image memory footprintarch/x86/boot/header.S arch/x86/boot/tools/build.c+8 -480 replies
7/23x86/boot: Drop redundant code setting the root devicearch/x86/boot/header.S arch/x86/boot/tools/build.c+1 -80 replies
8/23x86/boot: Drop references to startup_64arch/x86/boot/Makefile arch/x86/boot/tools/build.c+1 -40 replies
9/23x86/boot: Grab kernel_info offset from zoffset header directlyarch/x86/boot/header.S arch/x86/boot/tools/build.c+1 -50 replies
10/23x86/boot: Set EFI handover offset directly in header asmarch/x86/boot/header.S arch/x86/boot/tools/build.c+17 -250 replies
11/23x86/boot: Define setup size in linker scriptarch/x86/boot/header.S arch/x86/boot/setup.ld arch/x86/boot/tools/build.c+5 -70 replies
12/23x86/boot: Derive file size from _edata symbolarch/x86/boot/Makefile arch/x86/boot/compressed/vmlinux.lds.S arch/x86/boot/header.S +1 more+12 -250 replies
13/23x86/boot: Construct PE/COFF .text section from assemblerarch/x86/boot/header.S arch/x86/boot/tools/build.c+7 -620 replies
14/23x86/boot: Drop PE/COFF .reloc sectionarch/x86/boot/header.S arch/x86/boot/setup.ld arch/x86/boot/tools/build.c+7 -510 replies
15/23x86/boot: Split off PE/COFF .data sectionarch/x86/boot/Makefile arch/x86/boot/header.S+16 -50 replies
16/23x86/boot: Increase section and file alignment to 4k/512arch/x86/boot/compressed/vmlinux.lds.S arch/x86/boot/header.S arch/x86/boot/setup.ld +1 more+51 -1250 replies
17/23x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat sectionarch/x86/boot/header.S arch/x86/boot/setup.ld+9 -110 replies
18/23x86/mm: Remove P*D_PAGE_MASK and P*D_PAGE_SIZE macrosarch/x86/include/asm/page_types.h arch/x86/kernel/amd_gart_64.c arch/x86/kernel/head64.c +4 more+20 -260 replies
19/23x86/head/64: Add missing __head annotation to startup_64_load_idt()arch/x86/kernel/head64.c+1 -10 replies
20/23x86/head/64: Move the __head definition to <asm/init.h>arch/x86/include/asm/init.h arch/x86/kernel/head64.c+3 -20 replies
21/23x86/sme: Move early SME kernel encryption handling into .head.textarch/x86/include/asm/mem_encrypt.h arch/x86/mm/mem_encrypt_identity.c+21 -290 replies
22/23x86/sev: Move early startup code into .head.text sectionarch/x86/boot/compressed/sev.c arch/x86/include/asm/sev.h arch/x86/kernel/sev-shared.c +1 more+24 -230 replies
23/23x86/efistub: Remap kernel text read-only before dropping NX attributearch/x86/boot/compressed/Makefile arch/x86/boot/compressed/misc.c arch/x86/include/asm/boot.h +1 more+13 -20 replies

Reviews trailers per patch

2 of 23 patches have a Reviewed-by or Acked-by.

PatchH. Peter Anvin (Intel)Anshuman KhandualMike RapoportTom Lendacky
1/23
2/23
3/23
4/23
5/23A-b
6/23
7/23
8/23
9/23
10/23
11/23
12/23
13/23
14/23
15/23
16/23
17/23
18/23R-b A-b
19/23
20/23
21/23T-b
22/23T-b
23/23

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH for-stable-6.1 00/23] x86/efistub backports

From: Ard Biesheuvel <[email protected]>

This is the final batch of changes to bring linux-6.1.y in sync with 6.6 and later in terms of compatibility with tightened boot security requirements imposed by MicroSoft, compliance with which is a prerequisite for them to be willing to resume signing distro shim images with the MS 3rd party secure boot certificate.

Without this, distros can only boot on off-the-shelf x86 PCs after disabling secure boot explicitly.

Most of these changes appeared in v6.8 and have been backported to v6.6 already.

Ard Biesheuvel (20):
x86/efi: Drop EFI stub .bss from .data section
x86/efi: Disregard setup header of loaded image x86/efistub: Reinstate soft limit for initrd loading x86/efi: Drop alignment flags from PE section headers x86/boot: Remove the 'bugger off' message
x86/boot: Omit compression buffer from PE/COFF image memory footprint x86/boot: Drop redundant code setting the root device x86/boot: Drop references to startup_64
x86/boot: Grab kernel_info offset from zoffset header directly x86/boot: Set EFI handover offset directly in header asm x86/boot: Define setup size in linker script
x86/boot: Derive file size from _edata symbol
x86/boot: Construct PE/COFF .text section from assembler x86/boot: Drop PE/COFF .reloc section
x86/boot: Split off PE/COFF .data section
x86/boot: Increase section and file alignment to 4k/512 x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section x86/sme: Move early SME kernel encryption handling into .head.text x86/sev: Move early startup code into .head.text section x86/efistub: Remap kernel text read-only before dropping NX attribute

Hou Wenlong (2):
x86/head/64: Add missing __head annotation to startup_64_load_idt() x86/head/64: Move the __head definition to <asm/init.h>

Pasha Tatashin (1):
x86/mm: Remove P*D_PAGE_MASK and P*D_PAGE_SIZE macros

 arch/x86/boot/Makefile                  |   2 +-
 arch/x86/boot/compressed/Makefile       |   2 +-
 arch/x86/boot/compressed/misc.c         |   1 +
 arch/x86/boot/compressed/sev.c          |   3 +
 arch/x86/boot/compressed/vmlinux.lds.S  |   6 +-
 arch/x86/boot/header.S                  | 211 ++++++---------
 arch/x86/boot/setup.ld                  |  14 +-
 arch/x86/boot/tools/build.c             | 273 +-------------------
 arch/x86/include/asm/boot.h             |   1 +
 arch/x86/include/asm/init.h             |   2 +
 arch/x86/include/asm/mem_encrypt.h      |   8 +-
 arch/x86/include/asm/page_types.h       |  12 +-
 arch/x86/include/asm/sev.h              |  10 +-
 arch/x86/kernel/amd_gart_64.c           |   2 +-
 arch/x86/kernel/head64.c                |   7 +-
 arch/x86/kernel/sev-shared.c            |  23 +-
 arch/x86/kernel/sev.c                   |  11 +-
 arch/x86/mm/mem_encrypt_boot.S          |   4 +-
 arch/x86/mm/mem_encrypt_identity.c      |  58 ++---
 arch/x86/mm/pat/set_memory.c            |   6 +-
 arch/x86/mm/pti.c                       |   2 +-
 drivers/firmware/efi/libstub/Makefile   |   7 -
 drivers/firmware/efi/libstub/x86-stub.c |  58 ++---
 23 files changed, 194 insertions(+), 529 deletions(-)
Signature · 1 line
2.44.0.769.g3c40516874-goog