linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] efi: implement support for EFI RT properties table
@ 2020-02-19 17:18 Ard Biesheuvel
  2020-02-19 17:18 ` [PATCH 1/9] efi: store mask of supported runtime services in struct efi Ard Biesheuvel
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Ard Biesheuvel @ 2020-02-19 17:18 UTC (permalink / raw)
  To: linux-efi
  Cc: Ard Biesheuvel, Leif Lindholm, Peter Jones, Alexander Graf,
	Heinrich Schuchardt, Jeff Brasen, Atish Patra, x86

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 <leif@nuviainc.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Alexander Graf <agraf@csgraf.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Cc: Atish Patra <Atish.Patra@wdc.com>
Cc: x86@kernel.org

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

-- 
2.17.1


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

end of thread, other threads:[~2020-02-20  3:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 17:18 [PATCH 0/9] efi: implement support for EFI RT properties table Ard Biesheuvel
2020-02-19 17:18 ` [PATCH 1/9] efi: store mask of supported runtime services in struct efi Ard Biesheuvel
2020-02-19 17:19 ` [PATCH 2/9] efi: add support for EFI_RT_PROPERTIES table Ard Biesheuvel
2020-02-19 17:19 ` [PATCH 3/9] efi: use more granular check for availability for variable services Ard Biesheuvel
2020-02-19 17:19 ` [PATCH 4/9] efi: register EFI rtc platform device only when available Ard Biesheuvel
2020-02-19 22:11   ` Alexandre Belloni
2020-02-19 17:19 ` [PATCH 5/9] infiniband: hfi1: use EFI GetVariable " Ard Biesheuvel
2020-02-19 17:19 ` [PATCH 6/9] scsi: iscsi: " Ard Biesheuvel
2020-02-19 17:19 ` [PATCH 7/9] efi: use EFI ResetSystem " Ard Biesheuvel
2020-02-19 17:19 ` [PATCH 8/9] x86/ima: use EFI GetVariable " Ard Biesheuvel
2020-02-19 17:19 ` [PATCH 9/9] integrity: check properly whether EFI GetVariable() is available Ard Biesheuvel
2020-02-19 20:46   ` Serge E. Hallyn
2020-02-19 21:00     ` Ard Biesheuvel
2020-02-20  3:19       ` Serge E. Hallyn
2020-02-19 18:58 ` [PATCH 0/9] efi: implement support for EFI RT properties table Heinrich Schuchardt
2020-02-19 19:17   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).