diff options
author | Hannes Reinecke <hare@suse.de> | 2022-06-27 11:52:02 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-03 01:14:49 +0200 |
commit | f50fff73d620cd6e8f48bc58d4f1c944615a3fea (patch) | |
tree | e09610be62695593249b54f2081d954cffcf2f27 /drivers/nvme/host/tcp.c | |
parent | nvme-fabrics: decode 'authentication required' connect error (diff) | |
download | linux-f50fff73d620cd6e8f48bc58d4f1c944615a3fea.tar.xz linux-f50fff73d620cd6e8f48bc58d4f1c944615a3fea.zip |
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>
Diffstat (limited to 'drivers/nvme/host/tcp.c')
-rw-r--r-- | drivers/nvme/host/tcp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index b95ee85053e3..592ec078c5d7 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -2173,6 +2173,7 @@ static void nvme_tcp_error_recovery_work(struct work_struct *work) struct nvme_tcp_ctrl, err_work); struct nvme_ctrl *ctrl = &tcp_ctrl->ctrl; + nvme_auth_stop(ctrl); nvme_stop_keep_alive(ctrl); flush_work(&ctrl->async_event_work); nvme_tcp_teardown_io_queues(ctrl, false); |