Re: [PATCH 16/21] nvme-auth: target: remove obsolete crypto_has_shash() checks
From: Hannes Reinecke
Date: Tue Mar 03 2026 - 02:45:00 EST
On 3/2/26 08:59, Eric Biggers wrote:
Since nvme-auth is now doing its HMAC computations using the cryptoReviewed-by: Hannes Reinecke <hare@xxxxxxx>
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@xxxxxxxxxx>
---
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(-)
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +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