[PATCH 03/10] nvme: add nvme_auth_generate_digest()
Christoph Hellwig
hch at lst.de
Tue Jan 28 00:56:28 PST 2025
> + * @psk_len: Lenght of @psk
Spelling: Lenght -> Length.
> + * specified in item 4 above (ie the hash function of the cipher suite associated
> + * with the PSK identity) with the PSK as HMAC key to the concatenation of:
> + * - the NQN of the host (i.e., NQNh) not including the null terminator;
> + * - a space character;
> + * - the NQN of the NVM subsystem (i.e., NQNc) not including the null terminator;
Same issue with overly long comment lines as in the last patch.
(I won't bring this up another time if it shows up in the next patches)
> + shash = kmalloc(sizeof(struct shash_desc) +
> + crypto_shash_descsize(tfm),
> + GFP_KERNEL);
SHASH_DESC_ON_STACK?
> + ret = base64_encode(digest, digest_len, enc);
> + if (ret < hmac_len)
> + ret = -ENOKEY;
> + else {
> + *ret_digest = enc;
> + ret = 0;
> + }
Messed up formatting here. But this would normally be a:
if (ret < hmac_len) {
ret = -ENOKEY;
goto out_free_shash;
}
*ret_digest = enc;
ret = 0;
More information about the Linux-nvme
mailing list