All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] efi: Enable BTI for EFI runtimes services
@ 2023-02-06 12:49 ` Ard Biesheuvel
  0 siblings, 0 replies; 44+ messages in thread
From: Ard Biesheuvel @ 2023-02-06 12:49 UTC (permalink / raw)
  To: linux-efi
  Cc: linux-arm-kernel, Ard Biesheuvel, Catalin Marinas, Will Deacon,
	Kees Cook, Mark Rutland, Peter Zijlstra, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen

The EFI spec v2.10 introduces a global flag in the memory attributes
table that indicates whether the EFI runtime code regions were emitted
with BTI landing pads, and can therefore tolerate being mapped with BTI
enforcement enabled.

Add the generic plumbing for this, and wire it up for arm64.

Changes since v1:
- enable BTI in UEFI code regions even if CONFIG_ARM64_BIT_KERNEL=n
- deal with BTI exceptions occuring in EFI code gracefully
- add equivalent handling to x86
- add Kees's R-b

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>

Ard Biesheuvel (3):
  efi: Discover BTI support in runtime services regions
  efi: arm64: Wire up BTI annotation in memory attributes table
  efi: x86: Wire up IBT annotation in memory attributes table

 arch/arm/include/asm/efi.h     |  2 +-
 arch/arm/kernel/efi.c          |  5 +++--
 arch/arm64/include/asm/efi.h   |  3 ++-
 arch/arm64/kernel/efi.c        | 17 ++++++++++++++---
 arch/arm64/kernel/traps.c      |  6 ++++++
 arch/riscv/include/asm/efi.h   |  2 +-
 arch/riscv/kernel/efi.c        |  3 ++-
 arch/x86/include/asm/efi.h     |  4 +++-
 arch/x86/include/asm/ibt.h     |  4 ++--
 arch/x86/kernel/apm_32.c       |  4 ++--
 arch/x86/kernel/cpu/common.c   |  5 +++--
 arch/x86/platform/efi/efi_64.c |  8 +++++++-
 drivers/firmware/efi/memattr.c |  7 ++++++-
 include/linux/efi.h            |  8 ++++++--
 14 files changed, 58 insertions(+), 20 deletions(-)

-- 
2.39.1


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2023-02-20 16:48 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 12:49 [PATCH v2 0/3] efi: Enable BTI for EFI runtimes services Ard Biesheuvel
2023-02-06 12:49 ` Ard Biesheuvel
2023-02-06 12:49 ` [PATCH v2 1/3] efi: Discover BTI support in runtime services regions Ard Biesheuvel
2023-02-06 12:49   ` Ard Biesheuvel
2023-02-06 12:49 ` [PATCH v2 2/3] efi: arm64: Wire up BTI annotation in memory attributes table Ard Biesheuvel
2023-02-06 12:49   ` Ard Biesheuvel
2023-02-08 13:00   ` Will Deacon
2023-02-08 13:00     ` Will Deacon
2023-02-08 13:03     ` Ard Biesheuvel
2023-02-08 13:03       ` Ard Biesheuvel
2023-02-08 14:25       ` Mark Rutland
2023-02-08 14:25         ` Mark Rutland
2023-02-08 14:36         ` Ard Biesheuvel
2023-02-08 14:36           ` Ard Biesheuvel
2023-02-09 14:21           ` Ard Biesheuvel
2023-02-09 14:21             ` Ard Biesheuvel
2023-02-09 15:13             ` Mark Rutland
2023-02-09 15:13               ` Mark Rutland
2023-02-09 15:48             ` Will Deacon
2023-02-09 15:48               ` Will Deacon
2023-02-20 15:53           ` Mark Brown
2023-02-20 15:53             ` Mark Brown
2023-02-20 16:46             ` Ard Biesheuvel
2023-02-20 16:46               ` Ard Biesheuvel
2023-02-06 12:49 ` [PATCH v2 3/3] efi: x86: Wire up IBT " Ard Biesheuvel
2023-02-06 12:49   ` Ard Biesheuvel
2023-02-08 15:17   ` Dave Hansen
2023-02-08 15:17     ` Dave Hansen
2023-02-08 20:14     ` Peter Zijlstra
2023-02-08 20:14       ` Peter Zijlstra
2023-02-08 20:55       ` Mark Rutland
2023-02-08 20:55         ` Mark Rutland
2023-02-09 16:13         ` Kees Cook
2023-02-09 16:13           ` Kees Cook
2023-02-09 16:23           ` Ard Biesheuvel
2023-02-09 16:23             ` Ard Biesheuvel
2023-02-09 16:27             ` Dave Hansen
2023-02-09 16:27               ` Dave Hansen
2023-02-09 16:37             ` Kees Cook
2023-02-09 16:37               ` Kees Cook
2023-02-08 17:30   ` Peter Zijlstra
2023-02-08 17:30     ` Peter Zijlstra
2023-02-08 12:35 ` [PATCH v2 0/3] efi: Enable BTI for EFI runtimes services Ard Biesheuvel
2023-02-08 12:35   ` Ard Biesheuvel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.