[PATCH v2 4/4] tpm2-sessions: Re-orchestrate tpm2_read_public() use
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sun Nov 15 23:40:23 UTC 2026
> Move TPM handle name resolution out of tpm_buf_append_name(), so that
> callers resolve object names explicitly before constructing HMAC-protected
> commands:
>
> 1. Export tpm2_read_public(), so that trusted_tpm2 can resolve handle
> names, and store non-object handles in big-endian byte order matching
> the TPM 2.0 handle Name definition.
> 2. Call tpm2_read_public() explicitly in tpm2_seal_trusted(),
> tpm2_load_cmd(), and tpm2_unseal_cmd() before starting the auth
> session, and pass the pre-resolved name and size to
> tpm_buf_append_name().
> 3. Rework tpm_buf_append_name() and tpm_buf_fill_hmac_session() to use
> the caller-supplied name and size directly.
>
> This reduces fallible exits from tpm2_buf_append_name().
>
> Signed-off-by: Jarkko Sakkinen <jarkko at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261115233156.1485238-1-jarkko@kernel.org?part=4
More information about the Linux-security-module-archive
mailing list