]> Gentwo Git Trees - linux/.git/commit
tpm: Use -EPERM as fallback error code in tpm_ret_to_err
authorJarkko Sakkinen <jarkko.sakkinen@opinsys.com>
Tue, 30 Sep 2025 13:02:54 +0000 (16:02 +0300)
committerJarkko Sakkinen <jarkko@kernel.org>
Wed, 3 Dec 2025 20:55:28 +0000 (22:55 +0200)
commit7fcf459ac84c42a4ef63a650dccc345602cf4da6
treef7a17e12ae2b2c0102898d1375d7c71985cc5c2c
parentfaf07e611dfa464b201223a7253e9dc5ee0f3c9e
tpm: Use -EPERM as fallback error code in tpm_ret_to_err

Using -EFAULT as the tpm_ret_to_err() fallback error code causes makes it
incompatible on how trusted keys transmute TPM return codes.

Change the fallback as -EPERM in order to gain compatibility with trusted
keys. In addition, map TPM_RC_HASH to -EINVAL in order to be compatible
with tpm2_seal_trusted() return values.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
include/linux/tpm.h