Commit 724b03ee authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'efi-next-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI updates from Ard Biesheuvel:
 "Not a lot going on in the EFI tree this cycle. The only thing that
  stands out is the new support for SBAT metadata, which was a bit
  contentious when it was first proposed, because in the initial
  incarnation, it would have required us to maintain a revocation index,
  and bump it each time a vulnerability affecting UEFI secure boot got
  fixed. This was shot down for obvious reasons.

  This time, only the changes needed to emit the SBAT section into the
  PE/COFF image are being carried upstream, and it is up to the distros
  to decide what to put in there when creating and signing the build.

  This only has the EFI zboot bits (which the distros will be using for
  arm64); the x86 bzImage changes should be arriving next cycle,
  presumably via the -tip tree.

  Summary:

   - Add support for emitting a .sbat section into the EFI zboot image,
     so that downstreams can easily include revocation metadata in the
     signed EFI images

   - Align PE symbolic constant names with other projects

   - Bug fix for the efi_test module

   - Log the physical address and size of the EFI memory map when
     failing to map it

   - A kerneldoc fix for the EFI stub code"

* tag 'efi-next-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  include: pe.h: Fix PE definitions
  efi/efi_test: Fix missing pending status update in getwakeuptime
  efi: zboot specific mechanism for embedding SBAT section
  efi/libstub: Describe missing 'out' parameter in efi_load_initrd
  efi: Improve logging around memmap init
parents 1fbbb629 46550e2b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
		@ is accepted as an EFI binary. Booting via the UEFI stub
		@ will not execute those instructions, but the ARM/Linux
		@ boot protocol does, so we need some NOPs here.
		.inst	MZ_MAGIC | (0xe225 << 16)	@ eor r5, r5, 0x4d000
		.inst	IMAGE_DOS_SIGNATURE | (0xe225 << 16) @ eor r5, r5, 0x4d000
		eor	r5, r5, 0x4d000			@ undo previous insn
#else
		__nop
@@ -43,7 +43,7 @@
		.long	pe_header - start		@ Offset to the PE header.

pe_header:
		.long	PE_MAGIC
		.long	IMAGE_NT_SIGNATURE

coff_header:
		.short	IMAGE_FILE_MACHINE_THUMB	@ Machine
@@ -60,7 +60,7 @@ coff_header:
#define __pecoff_code_size (__pecoff_data_start - __efi_start)

optional_header:
		.short	PE_OPT_MAGIC_PE32		@ PE32 format
		.short	IMAGE_NT_OPTIONAL_HDR32_MAGIC	@ PE32 format
		.byte	0x02				@ MajorLinkerVersion
		.byte	0x14				@ MinorLinkerVersion
		.long	__pecoff_code_size		@ SizeOfCode
+3 −3
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
	.macro	__EFI_PE_HEADER
#ifdef CONFIG_EFI
	.set	.Lpe_header_offset, . - .L_head
	.long	PE_MAGIC
	.long	IMAGE_NT_SIGNATURE
	.short	IMAGE_FILE_MACHINE_ARM64		// Machine
	.short	.Lsection_count				// NumberOfSections
	.long	0 					// TimeDateStamp
@@ -40,7 +40,7 @@
		IMAGE_FILE_LINE_NUMS_STRIPPED		// Characteristics

.Loptional_header:
	.short	PE_OPT_MAGIC_PE32PLUS			// PE32+ format
	.short	IMAGE_NT_OPTIONAL_HDR64_MAGIC		// PE32+ format
	.byte	0x02					// MajorLinkerVersion
	.byte	0x14					// MinorLinkerVersion
	.long	__initdata_begin - .Lefi_header_end	// SizeOfCode
@@ -66,7 +66,7 @@
	.long	.Lefi_header_end - .L_head		// SizeOfHeaders
	.long	0					// CheckSum
	.short	IMAGE_SUBSYSTEM_EFI_APPLICATION		// Subsystem
	.short	IMAGE_DLL_CHARACTERISTICS_NX_COMPAT	// DllCharacteristics
	.short	IMAGE_DLLCHARACTERISTICS_NX_COMPAT	// DllCharacteristics
	.quad	0					// SizeOfStackReserve
	.quad	0					// SizeOfStackCommit
	.quad	0					// SizeOfHeapReserve
+2 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
#include <linux/sizes.h>

	.macro	__EFI_PE_HEADER
	.long	PE_MAGIC
	.long	IMAGE_NT_SIGNATURE
.Lcoff_header:
	.short	IMAGE_FILE_MACHINE_LOONGARCH64		/* Machine */
	.short	.Lsection_count				/* NumberOfSections */
@@ -20,7 +20,7 @@
		IMAGE_FILE_LINE_NUMS_STRIPPED		/* Characteristics */

.Loptional_header:
	.short	PE_OPT_MAGIC_PE32PLUS			/* PE32+ format */
	.short	IMAGE_NT_OPTIONAL_HDR64_MAGIC		/* PE32+ format */
	.byte	0x02					/* MajorLinkerVersion */
	.byte	0x14					/* MinorLinkerVersion */
	.long	__inittext_end - .Lefi_header_end	/* SizeOfCode */
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
	__HEAD

_head:
	.word	MZ_MAGIC		/* "MZ", MS-DOS header */
	.word	IMAGE_DOS_SIGNATURE	/* "MZ", MS-DOS header */
	.org	0x8
	.dword	_kernel_entry		/* Kernel entry point (physical address) */
	.dword	_kernel_asize		/* Kernel image effective size */
+4 −4
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
#include <asm/set_memory.h>

	.macro	__EFI_PE_HEADER
	.long	PE_MAGIC
	.long	IMAGE_NT_SIGNATURE
coff_header:
#ifdef CONFIG_64BIT
	.short	IMAGE_FILE_MACHINE_RISCV64		// Machine
@@ -27,9 +27,9 @@ coff_header:

optional_header:
#ifdef CONFIG_64BIT
	.short	PE_OPT_MAGIC_PE32PLUS			// PE32+ format
	.short	IMAGE_NT_OPTIONAL_HDR64_MAGIC		// PE32+ format
#else
	.short	PE_OPT_MAGIC_PE32			// PE32 format
	.short	IMAGE_NT_OPTIONAL_HDR32_MAGIC		// PE32 format
#endif
	.byte	0x02					// MajorLinkerVersion
	.byte	0x14					// MinorLinkerVersion
@@ -64,7 +64,7 @@ extra_header_fields:
	.long	efi_header_end - _start			// SizeOfHeaders
	.long	0					// CheckSum
	.short	IMAGE_SUBSYSTEM_EFI_APPLICATION		// Subsystem
	.short	IMAGE_DLL_CHARACTERISTICS_NX_COMPAT	// DllCharacteristics
	.short	IMAGE_DLLCHARACTERISTICS_NX_COMPAT	// DllCharacteristics
	.quad	0					// SizeOfStackReserve
	.quad	0					// SizeOfStackCommit
	.quad	0					// SizeOfHeapReserve
Loading