linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Add OP-TEE based RPMB driver for UFS devices
@ 2025-09-23 15:39 Bean Huo
  2025-09-23 15:39 ` [PATCH v1 1/3] rpmb: move rpmb_frame struct and constants to common header Bean Huo
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Bean Huo @ 2025-09-23 15:39 UTC (permalink / raw)
  To: avri.altman, bvanassche, alim.akhtar, jejb, martin.petersen,
	can.guo, ulf.hansson, beanhuo, jens.wiklander
  Cc: linux-scsi, linux-kernel, Bean Huo

This patch series introduces OP-TEE based RPMB (Replay Protected Memory Block)
support for UFS devices, extending the kernel-level secure storage capabilities
that are currently available for eMMC devices.

Background:
Previously, OP-TEE required a userspace supplicant to access RPMB partitions,
which created complex dependencies and reliability issues, especially during
early boot scenarios. Recent work by Linaro has moved core supplicant
functionality directly into the Linux kernel for eMMC devices, eliminating
userspace dependencies and enabling immediate secure storage access.

This series extends that same approach to UFS devices, which are becoming
increasingly common in enterprise and mobile applications that require secure
storage capabilities.

Benefits:
- Eliminates dependency on userspace supplicant for UFS RPMB access
- Enables early boot secure storage access (e.g., fTPM, secure UEFI variables)
- Provides kernel-level RPMB access as soon as UFS driver is initialized
- Removes complex initramfs dependencies and boot ordering requirements
- Ensures reliable and deterministic secure storage operations
- Supports both built-in and modular fTPM configurations.


RFC v1 -- v1:
        1. Added support for all UFS RPMB regions based on https://github.com/OP-TEE/optee_os/issues/7532
        2. Incorporated feedback and suggestions from Bart.

Bean Huo (3):
  rpmb: move rpmb_frame struct and constants to common header
  scsi: ufs: core: fix incorrect buffer duplication in
    ufshcd_read_string_desc()
  scsi: ufs: core: Add OP-TEE based RPMB driver for UFS devices

 drivers/misc/Kconfig           |   2 +-
 drivers/mmc/core/block.c       |  42 ------
 drivers/ufs/core/Makefile      |   1 +
 drivers/ufs/core/ufs-rpmb.c    | 259 +++++++++++++++++++++++++++++++++
 drivers/ufs/core/ufshcd-priv.h |  13 ++
 drivers/ufs/core/ufshcd.c      |  32 +++-
 include/linux/rpmb.h           |  44 ++++++
 include/ufs/ufs.h              |   7 +
 include/ufs/ufshcd.h           |   3 +
 9 files changed, 355 insertions(+), 48 deletions(-)
 create mode 100644 drivers/ufs/core/ufs-rpmb.c

-- 
2.34.1


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

end of thread, other threads:[~2025-09-27  8:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 15:39 [PATCH v1 0/3] Add OP-TEE based RPMB driver for UFS devices Bean Huo
2025-09-23 15:39 ` [PATCH v1 1/3] rpmb: move rpmb_frame struct and constants to common header Bean Huo
2025-09-23 20:28   ` Bart Van Assche
2025-09-24  6:12   ` Avri Altman
2025-09-25 14:51     ` Bean Huo
2025-09-25 15:45       ` Avri Altman
2025-09-23 15:39 ` [PATCH v1 2/3] scsi: ufs: core: fix incorrect buffer duplication in ufshcd_read_string_desc() Bean Huo
2025-09-23 16:57   ` Bart Van Assche
2025-09-23 15:39 ` [PATCH v1 3/3] scsi: ufs: core: Add OP-TEE based RPMB driver for UFS devices Bean Huo
2025-09-23 20:27   ` Bart Van Assche
2025-09-27  8:40     ` Bean Huo

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).