nvmet-tcp: enable TLS handshake upcall
authorHannes Reinecke <hare@suse.de>
Thu, 24 Aug 2023 14:39:23 +0000 (16:39 +0200)
committerKeith Busch <kbusch@kernel.org>
Wed, 11 Oct 2023 17:29:59 +0000 (10:29 -0700)
commit675b453e024154dd547921c6e6d5b58747ba7e0e
tree2fee2aec3ad6eac24fd16f96636d58441f5a8ae0
parenteb398812bd046e86a332229d8a17525a05351b20
nvmet-tcp: enable TLS handshake upcall

TLS handshake is handled in userspace with the netlink tls handshake
protocol.

The patch adds a function to start the TLS handshake upcall for any
incoming network connections if the TCP TSAS sectype is set to 'tls1.3'.

A config option NVME_TARGET_TCP_TLS selects whether the TLS handshake
upcall should be compiled in.  The patch also adds reference counting
to struct nvmet_tcp_queue to ensure the queue is always valid when the
the TLS handshake completes.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/Kconfig
drivers/nvme/target/configfs.c
drivers/nvme/target/nvmet.h
drivers/nvme/target/tcp.c