nvme: blank out authentication fabrics options if not configured
authorHannes Reinecke <hare@suse.de>
Thu, 16 Nov 2023 12:14:35 +0000 (13:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 06:33:06 +0000 (07:33 +0100)
commit399d76d3306453200621f8b5c6fc7df28c659dcd
treece5a135cf658565853a490f9ea0414a5d2284a24
parentceca54f1f0ff6ddc23412951d829b9c34b0246c3
nvme: blank out authentication fabrics options if not configured

[ Upstream commit c7ca9757bda35ff9ce27ab42f2cb8b84d983e6ad ]

If the config option NVME_HOST_AUTH is not selected we should not
accept the corresponding fabrics options. This allows userspace
to detect if NVMe authentication has been enabled for the kernel.

Cc: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fixes: f50fff73d620 ("nvme: implement In-Band authentication")
Signed-off-by: Hannes Reinecke <hare@suse.de>
Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/fabrics.c