Skip to content

efi: implement support for EFI RT properties table

Ard Biesheuvel linux-efi linux-rdma linux-rtc linux-scsi linux-security-module 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9efi: store mask of supported runtime services in struct efidrivers/firmware/efi/efi.c include/linux/efi.h+48 -100 replies
2/9efi: add support for EFI_RT_PROPERTIES tabledrivers/firmware/efi/efi.c include/linux/efi.h+21 -00 replies
3/9efi: use more granular check for availability for variable servicesdrivers/firmware/efi/efi-pstore.c drivers/firmware/efi/efi.c drivers/firmware/efi/efivars.c +1 more+11 -230 replies
4/9efi: register EFI rtc platform device only when availabledrivers/firmware/efi/efi.c drivers/rtc/Makefile drivers/rtc/rtc-efi-platform.c+3 -391 reply
5/9infiniband: hfi1: use EFI GetVariable only when availabledrivers/infiniband/hw/hfi1/efivar.c+1 -10 replies
6/9scsi: iscsi: use EFI GetVariable only when availabledrivers/scsi/isci/init.c+1 -10 replies
7/9efi: use EFI ResetSystem only when availabledrivers/firmware/efi/reboot.c+2 -20 replies
8/9x86/ima: use EFI GetVariable only when availablearch/x86/kernel/ima_arch.c+1 -10 replies
9/9integrity: check properly whether EFI GetVariable() is availablesecurity/integrity/platform_certs/load_uefi.c+1 -13 replies

Reviews trailers per patch

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

PatchAlexandre BelloniSerge Hallyn
1/9
2/9
3/9
4/9A-b
5/9
6/9
7/9
8/9
9/9A-b

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 0/9] efi: implement support for EFI RT properties table

The UEFI spec version 2.8 errata A defines a configuration table called EFI_RT_PROPERTIES_TABLE that carries a mask describing which EFI runtime services are still functional at OS runtime.

Even though any runtime services that cease to be functional when exiting boot services are still required to return EFI_UNSUPPORTED when called by the OS, having this mask is helpful, since we can use it to prevent modules like efi-rtc or efivars from loading, instead of allowing them to probe and fail with an error.

So let's wire this up: make some room in struct efi for the mask, read it from the EFI_RT_PROPERTIES_TABLE if available, and replace various instances of 'if (efi_enabled(EFI_RUNTIME_SERVICES))' with checks for the runtime service in question that the code relies upon.

Cc Leif Lindholm <[email protected]>
Cc Peter Jones <[email protected]>
Cc Alexander Graf <[email protected]>
Cc Heinrich Schuchardt <[email protected]>
Cc Jeff Brasen <[email protected]>
Cc Atish Patra <[email protected]>

Ard Biesheuvel (9):
efi: store mask of supported runtime services in struct efi
efi: add support for EFI_RT_PROPERTIES table
efi: use more granular check for availability for variable services
efi: register EFI rtc platform device only when available
infiniband: hfi1: use EFI GetVariable only when available
scsi: iscsi: use EFI GetVariable only when available
efi: use EFI ResetSystem only when available
x86/ima: use EFI GetVariable only when available
integrity: check properly whether EFI GetVariable() is available

 arch/x86/kernel/ima_arch.c                    |  2 +-
 drivers/firmware/efi/efi-pstore.c             |  2 +-
 drivers/firmware/efi/efi.c                    | 70 +++++++++++--------
 drivers/firmware/efi/efivars.c                |  2 +-
 drivers/firmware/efi/reboot.c                 |  4 +-
 drivers/infiniband/hw/hfi1/efivar.c           |  2 +-
 drivers/rtc/Makefile                          |  4 --
 drivers/rtc/rtc-efi-platform.c                | 35 ----------
 drivers/scsi/isci/init.c                      |  2 +-
 fs/efivarfs/super.c                           |  2 +-
 include/linux/efi.h                           | 40 +++++++++++
 security/integrity/platform_certs/load_uefi.c |  2 +-
 12 files changed, 89 insertions(+), 78 deletions(-)
 delete mode 100644 drivers/rtc/rtc-efi-platform.c
Signature · 1 line
2.17.1