[PATCH 05/10] nvme-keyring: add nvme_tls_psk_refresh()

Hannes Reinecke hare at suse.de
Mon Feb 3 05:55:24 PST 2025


On 1/28/25 10:00, Christoph Hellwig wrote:
> On Wed, Jan 22, 2025 at 05:58:24PM +0100, Hannes Reinecke wrote:
>> +static inline struct key *nvme_tls_psk_refresh(struct key *keyring,
>> +		const char *hostnqn, char *subnqn, u8 hmac_id,
>> +		u8 *data, size_t data_len, const char *digest)
>> +{
>> +	return ERR_PTR(-ENOTSUPP);
> 
> Is this supposed to be -EOPNOTSUPP?
> 
Possibly.

> Also the later added callers treat this an an error.  Should this
> stub be reachable at all?
> 
Yes, and no.
The function is called unconditionally from drivers/nvme/host/tcp.c,
so we need to provide the stub when nvme-keyring is not available.
I could make it conditional depending on CONFIG_NVME_KEYRING, but
then Sagi wanted to reduce the usage of conditional compilations.
I don't mind.

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