Re: [PATCH v4 2/2] ufs: rpmb: use a fixed-length RPMB dev_id

From: Bean Huo

Date: Sun Aug 30 2026 - 12:06:04 EST


On Thu, 2026-08-27 at 09:03 +0200, Jorge Ramirez-Ortiz wrote:
> The RPMB authentication key is derived from the dev_id handed to the
> RPMB subsystem. OP-TEE implements the eMMC RPMB flow, where the dev_id
> is the eMMC CID: a fixed 16-byte value the key derivation depends on.
>
> The UFS RPMB id is "<device_id>-R<region>", which is variable length
> and longer than 16 bytes. Handing it to the RPMB subsystem as-is would
> tie the derived key to a length OP-TEE does not expect and diverge from
> the fixed-CID eMMC ABI, forcing OP-TEE to be taught about
> variable-length UFS ids.
>
> A fixed 16-byte dev_id is needed so the derived key stays stable and
> unique per region while matching the eMMC CID layout OP-TEE relies on,
> keeping the key-derivation ABI identical with no OP-TEE change. The
> reduction to a fixed 16 bytes must also be reproducible by the
> bootloaders (such as U-Boot) that derive the same dev_id.
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@xxxxxxxxxxxxxxxx>

I gave my Reviewed-by on v3 2/2 [1], but it seems to have been dropped here. If
the patch hasn't changed much, must be picked, add again:


Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx>


Documentation/process/submitting-patches.rst asks author to carry review tags
into later versions, and to note it below the '---' when a tag is dropped.

[1]https://lore.kernel.org/all/c041d409bf6f564c6743a0d03e0c851ce3afa6d5.camel@xxxxxxxx/

Kind regards,
Bean