[PATCH] nvme-auth: use IS_REACHABLE for nvme_auth_extract_key() declaration

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Nov 3 11:43:15 PST 2025


On 11/3/25 3:46 AM, Christoph Hellwig wrote:
> So with Keith' latest fixes the auth code should always be built
> in if either the host or target code is built in.  Did this not
> work, or is this for an older branch?
>
>
it errors out with following since NVMe over Fabrics In-Band Authentication
is built-in only on my machine :-

make menuconfig -->  NVMe over Fabrics In-Band Authentication --> *
(* only option no <M>)

nvme (nvme-6.19) # grep NVME_AUTH .config
CONFIG_NVME_AUTH_STATE=y
CONFIG_NVME_AUTH=m
nvme (nvme-6.19) #

Makefile compiles auth.c
   obj-$(CONFIG_NVME_AUTH) += nvme-auth.o
   nvme-auth-y += auth.o
   auth.c gets compiled as part of nvme-auth.ko module
   make[1]: Entering directory '/mnt/data/nvme/drivers/nvme'
   CC [M]  common/auth.o
   CC [M]  host/core.o
   CC [M]  host/sysfs.o
   CC [M]  target/configfs.o
   CC [M]  host/auth.o
   CC [M]  host/fabrics.o
   CC [M]  target/fabrics-cmd-auth.o
   CC [M]  target/auth.o
common/auth.c:158:13: error: redefinition of ‘nvme_auth_extract_key’
   158 | struct key *nvme_auth_extract_key(struct key *keyring, const u8 *secret,
       |             ^~~~~~~~~~~~~~~~~~~~~

-ck




More information about the Linux-nvme mailing list