mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] introduce tee-based EFI Runtime Variable Service
@ 2023-02-20  5:17 Masahisa Kojima
  2023-02-20  5:17 ` [PATCH v2 1/4] efi: expose efivar generic ops register function Masahisa Kojima
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Masahisa Kojima @ 2023-02-20  5:17 UTC (permalink / raw)
  To: Ard Biesheuvel, Jens Wiklander, Sumit Garg, linux-kernel, op-tee
  Cc: Ilias Apalodimas, Johan Hovold, Masahisa Kojima

This series introduces the tee based EFI Runtime Variable Service.

This version moves StMM related code from drivers/tee/optee to
drivers/firmware/efi/stmm, since StMM code does not contain
OP-TEE specific code and can be used with other TEE implementation.

The eMMC device is typically owned by the non-secure world(linux in
this case). There is an existing solution utilizing eMMC RPMB partition
for EFI Variables, it is implemented by interacting with
OP-TEE, StandaloneMM(as EFI Variable Service Pseudo TA), eMMC driver
and tee-supplicant. The last piece is the tee-based variable access
driver to interact with OP-TEE and StandaloneMM.

Changelog:
rfc v1 -> v2:
- split patch into three patches, one for drivers/tee,
  one for include/linux/efi.h, and one for the driver/firmware/efi/stmm
- context/session management into probe() and remove() same as other tee
client driver
- StMM variable driver is moved from driver/tee/optee to driver/firmware/efi
- use "tee" prefix instead of "optee" in driver/firmware/efi/stmm/tee_stmm_efi.c,
  this file does not contain op-tee specific code, abstracted by tee layer and
  StMM variable driver will work on other tee implementation.
- PTA_STMM_CMD_COMMUNICATE -> PTA_STMM_CMD_COMMUNICATE
- implement query_variable_store() but currently not used
- no use of TEEC_SUCCESS, it is defined in driver/tee/optee/optee_private.h.
  Other tee client drivers use 0 instead of using TEEC_SUCCESS
- remove TEEC_ERROR_EXCESS_DATA status, it is refered just to output
error message

Masahisa Kojima (4):
  efi: expose efivar generic ops register function
  efi: Add EFI_ACCESS_DENIED status code
  tee: expose tee efivar register function
  efi: Add tee-based EFI variable driver

 drivers/firmware/efi/Kconfig                 |  15 +
 drivers/firmware/efi/Makefile                |   1 +
 drivers/firmware/efi/efi.c                   |  12 +
 drivers/firmware/efi/stmm/mm_communication.h | 249 ++++++++
 drivers/firmware/efi/stmm/tee_stmm_efi.c     | 620 +++++++++++++++++++
 drivers/tee/tee_core.c                       |  23 +
 include/linux/efi.h                          |   4 +
 include/linux/tee_drv.h                      |  23 +
 8 files changed, 947 insertions(+)
 create mode 100644 drivers/firmware/efi/stmm/mm_communication.h
 create mode 100644 drivers/firmware/efi/stmm/tee_stmm_efi.c

-- 
2.30.2


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20  5:17 [PATCH v2 0/4] introduce tee-based EFI Runtime Variable Service Masahisa Kojima
2023-02-20  5:17 ` [PATCH v2 1/4] efi: expose efivar generic ops register function Masahisa Kojima
2023-02-20  5:17 ` [PATCH v2 2/4] efi: Add EFI_ACCESS_DENIED status code Masahisa Kojima
2023-02-20  5:17 ` [PATCH v2 3/4] tee: expose tee efivar register function Masahisa Kojima
2023-02-20  7:54   ` kernel test robot
2023-02-20  7:54   ` kernel test robot
2023-02-20  9:17   ` Sumit Garg
2023-02-20 10:35     ` Masahisa Kojima
2023-02-20  5:17 ` [PATCH v2 4/4] efi: Add tee-based EFI variable driver Masahisa Kojima
2023-02-20  7:54   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome