RE: [PATCH v2 3/3] scsi: ufs: core: Add OP-TEE based RPMB driver for UFS devices
From: Avri Altman
Date: Wed Oct 01 2025 - 06:07:08 EST
> From: Bean Huo <beanhuo@xxxxxxxxxx>
>
> This patch adds OP-TEE based RPMB support for UFS devices. This enables
> secure RPMB operations on UFS devices through OP-TEE, providing the same
> functionality available for eMMC devices and extending kernel-based secure
> storage support to UFS-based systems.
>
> Benefits of OP-TEE based RPMB implementation:
> - Eliminates dependency on userspace supplicant for 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
>
> Co-developed-by: Can Guo <can.guo@xxxxxxxxxxxxxxxx>
> Signed-off-by: Can Guo <can.guo@xxxxxxxxxxxxxxxx>
> Signed-off-by: Bean Huo <beanhuo@xxxxxxxxxx>
Reviewed-by: Avri Altman <avri.altman@xxxxxxxxxxx>
Nit: Would it make sense to simplify things, e.g. :
Instead of struct list_head rpmbs;
Use:
struct ufs_rpmb_dev *rpmbs[4];
Also, I don't remember if you were planning to add the additional rpmb operations (6 to 9) later or not.
Thanks,
Avri