]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: implement In-Band authentication
authorHannes Reinecke <hare@suse.de>
Mon, 27 Jun 2022 09:52:02 +0000 (11:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:14:49 +0000 (17:14 -0600)
commita5c5ee596db763e147c4f5abee9392222c79206e
treee09610be62695593249b54f2081d954cffcf2f27
parentbd0864b6f714e6482e6bd5ff0188e5c51150ce1b
nvme: implement In-Band authentication

Implement NVMe-oF In-Band authentication according to NVMe TPAR 8006.
This patch adds two new fabric options 'dhchap_secret' to specify the
pre-shared key (in ASCII respresentation according to NVMe 2.0 section
8.13.5.8 'Secret representation') and 'dhchap_ctrl_secret' to specify
the pre-shared controller key for bi-directional authentication of both
the host and the controller.
Re-authentication can be triggered by writing the PSK into the new
controller sysfs attribute 'dhchap_secret' or 'dhchap_ctrl_secret'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
[axboe: fold in clang build fix]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
16 files changed:
drivers/nvme/Kconfig
drivers/nvme/Makefile
drivers/nvme/common/Kconfig [new file with mode: 0644]
drivers/nvme/common/Makefile [new file with mode: 0644]
drivers/nvme/common/auth.c [new file with mode: 0644]
drivers/nvme/host/Kconfig
drivers/nvme/host/Makefile
drivers/nvme/host/auth.c [new file with mode: 0644]
drivers/nvme/host/core.c
drivers/nvme/host/fabrics.c
drivers/nvme/host/fabrics.h
drivers/nvme/host/nvme.h
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c
drivers/nvme/host/trace.c
include/linux/nvme-auth.h [new file with mode: 0644]