lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 25 Oct 2023 09:36:23 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Hannes Reinecke" <hare@...e.de>,
        "Arnd Bergmann" <arnd@...nel.org>,
        "Keith Busch" <kbusch@...nel.org>, "Jens Axboe" <axboe@...nel.dk>,
        "Christoph Hellwig" <hch@....de>,
        "Sagi Grimberg" <sagi@...mberg.me>,
        "Chaitanya Kulkarni" <kch@...dia.com>
Cc:     linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] nvme: keyring: fix conditional compilation

On Wed, Oct 25, 2023, at 09:02, Hannes Reinecke wrote:
> On 10/20/23 22:54, Arnd Bergmann wrote:
oid)
>> +
>> +static inline key_serial_t nvme_target_keyring_id(void)
>>   {
>> +	if (IS_ENABLED(CONFIG_NVME_TARGET_TCP_TLS))
>> +		return nvme_keyring_id();
>> +
>>   	return 0;
>>   }
>> -static inline int nvme_keyring_init(void)
>> +
>> +static inline int nvme_target_keyring_init(void)
>>   {
>> +	if (IS_ENABLED(CONFIG_NVME_TCP_TLS))
>> +		return nvme_keyring_init();
>> +
>>   	return 0;
>>   }
>> -static inline void nvme_keyring_exit(void) {}
>>   
>> -#endif /* !CONFIG_NVME_KEYRING */
>> +static inline void nvme_target_keyring_exit(void)
>> +{
>> +	if (IS_ENABLED(CONFIG_NVME_TARGET_TCP_TLS))
>> +		nvme_keyring_exit();
>> +}
>> +
>>   #endif /* _NVME_KEYRING_H */
>
> I guess the right way is to make 'keyring' a 'real' module, and move 
> 'nvme_keyring_init()' and 'nvme_keyring_exit()' as the modules init/exit 
> functions. I'll prepare a patch.

That's probably a good idea, but you still need to address
the link failure for nvme_keyring_id() and nvme_tls_psk_default()
when the caller is built-in and the definition is in a loadable
module.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ