]> Gentwo Git Trees - linux/.git/commit
KEYS: trusted: Replace a redundant instance of tpm2_hash_map
authorJarkko Sakkinen <jarkko@kernel.org>
Sat, 18 Oct 2025 17:41:36 +0000 (20:41 +0300)
committerJarkko Sakkinen <jarkko@kernel.org>
Sat, 29 Nov 2025 20:57:30 +0000 (22:57 +0200)
commit127fa2ae9e2b1f9b9d876dfaa39fe3640cec5764
tree4da8662315cdd638d739c7530ac8d10707027d05
parente1afacb68573c3cd0a3785c6b0508876cd3423bc
KEYS: trusted: Replace a redundant instance of tpm2_hash_map

'trusted_tpm2' duplicates 'tpm2_hash_map' originally part of the TPN
driver, which is suboptimal.

Implement and export `tpm2_find_hash_alg()` in the driver, and substitute
the redundant code in 'trusted_tpm2' with a call to the new function.

Reviewed-by: Jonathan McDowell <noodles@meta.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm2-cmd.c
include/linux/tpm.h
security/keys/trusted-keys/trusted_tpm2.c