[PATCH 16/21] nvme-auth: target: remove obsolete crypto_has_shash() checks
Hannes Reinecke
hare at suse.de
Mon Mar 2 23:43:18 PST 2026
On 3/2/26 08:59, Eric Biggers wrote:
> Since nvme-auth is now doing its HMAC computations using the crypto
> library, it's guaranteed that all the algorithms actually work.
> Therefore, remove the crypto_has_shash() checks which are now obsolete.
>
> However, the caller in nvmet_auth_negotiate() seems to have also been
> relying on crypto_has_shash(nvme_auth_hmac_name(host_hmac_id)) to
> validate the host_hmac_id. Therefore, make it validate the ID more
> directly by checking whether nvme_auth_hmac_hash_len() returns 0 or not.
>
> Signed-off-by: Eric Biggers <ebiggers at kernel.org>
> ---
> drivers/nvme/target/auth.c | 9 ---------
> drivers/nvme/target/configfs.c | 3 ---
> drivers/nvme/target/fabrics-cmd-auth.c | 4 +---
> 3 files changed, 1 insertion(+), 15 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list