* [PATCH] net/handshake: Add new parameter 'HANDSHAKE_A_ACCEPT_KEYRING'
@ 2025-05-07 9:40 hare
2025-05-07 15:35 ` Sagi Grimberg
2025-05-07 18:08 ` Chuck Lever
0 siblings, 2 replies; 3+ messages in thread
From: hare @ 2025-05-07 9:40 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Keith Busch, Sagi Grimberg, Chuck Lever, linux-nvme,
kernel-tls-handshake, Hannes Reinecke
From: Hannes Reinecke <hare@kernel.org>
Add a new netlink parameter 'HANDSHAKE_A_ACCEPT_KEYRING' to provide
the serial number of the keyring to use.
Signed-off-by: Hannes Reinecke <hare@kernel.org>
---
include/uapi/linux/handshake.h | 1 +
net/handshake/tlshd.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/uapi/linux/handshake.h b/include/uapi/linux/handshake.h
index 3d7ea58778c9..662e7de46c54 100644
--- a/include/uapi/linux/handshake.h
+++ b/include/uapi/linux/handshake.h
@@ -45,6 +45,7 @@ enum {
HANDSHAKE_A_ACCEPT_PEER_IDENTITY,
HANDSHAKE_A_ACCEPT_CERTIFICATE,
HANDSHAKE_A_ACCEPT_PEERNAME,
+ HANDSHAKE_A_ACCEPT_KEYRING,
__HANDSHAKE_A_ACCEPT_MAX,
HANDSHAKE_A_ACCEPT_MAX = (__HANDSHAKE_A_ACCEPT_MAX - 1)
diff --git a/net/handshake/tlshd.c b/net/handshake/tlshd.c
index d6f52839827e..081093dfd553 100644
--- a/net/handshake/tlshd.c
+++ b/net/handshake/tlshd.c
@@ -230,6 +230,12 @@ static int tls_handshake_accept(struct handshake_req *req,
if (ret < 0)
goto out_cancel;
}
+ if (treq->th_keyring) {
+ ret = nla_put_u32(msg, HANDSHAKE_A_ACCEPT_KEYRING,
+ treq->th_keyring);
+ if (ret < 0)
+ goto out_cancel;
+ }
ret = nla_put_u32(msg, HANDSHAKE_A_ACCEPT_AUTH_MODE,
treq->th_auth_mode);
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net/handshake: Add new parameter 'HANDSHAKE_A_ACCEPT_KEYRING'
2025-05-07 9:40 [PATCH] net/handshake: Add new parameter 'HANDSHAKE_A_ACCEPT_KEYRING' hare
@ 2025-05-07 15:35 ` Sagi Grimberg
2025-05-07 18:08 ` Chuck Lever
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2025-05-07 15:35 UTC (permalink / raw)
To: hare, Christoph Hellwig
Cc: Keith Busch, Chuck Lever, linux-nvme, kernel-tls-handshake
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/handshake: Add new parameter 'HANDSHAKE_A_ACCEPT_KEYRING'
2025-05-07 9:40 [PATCH] net/handshake: Add new parameter 'HANDSHAKE_A_ACCEPT_KEYRING' hare
2025-05-07 15:35 ` Sagi Grimberg
@ 2025-05-07 18:08 ` Chuck Lever
1 sibling, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2025-05-07 18:08 UTC (permalink / raw)
To: hare, Christoph Hellwig
Cc: Keith Busch, Sagi Grimberg, linux-nvme, kernel-tls-handshake
On 5/7/25 5:40 AM, hare@kernel.org wrote:
> From: Hannes Reinecke <hare@kernel.org>
>
> Add a new netlink parameter 'HANDSHAKE_A_ACCEPT_KEYRING' to provide
> the serial number of the keyring to use.
This needs to go through netdev@vger.kernel.org.
Acked-by: Chuck Lever <chuck.lever@oracle.com>
> Signed-off-by: Hannes Reinecke <hare@kernel.org>
> ---
> include/uapi/linux/handshake.h | 1 +
> net/handshake/tlshd.c | 6 ++++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/include/uapi/linux/handshake.h b/include/uapi/linux/handshake.h
> index 3d7ea58778c9..662e7de46c54 100644
> --- a/include/uapi/linux/handshake.h
> +++ b/include/uapi/linux/handshake.h
> @@ -45,6 +45,7 @@ enum {
> HANDSHAKE_A_ACCEPT_PEER_IDENTITY,
> HANDSHAKE_A_ACCEPT_CERTIFICATE,
> HANDSHAKE_A_ACCEPT_PEERNAME,
> + HANDSHAKE_A_ACCEPT_KEYRING,
>
> __HANDSHAKE_A_ACCEPT_MAX,
> HANDSHAKE_A_ACCEPT_MAX = (__HANDSHAKE_A_ACCEPT_MAX - 1)
> diff --git a/net/handshake/tlshd.c b/net/handshake/tlshd.c
> index d6f52839827e..081093dfd553 100644
> --- a/net/handshake/tlshd.c
> +++ b/net/handshake/tlshd.c
> @@ -230,6 +230,12 @@ static int tls_handshake_accept(struct handshake_req *req,
> if (ret < 0)
> goto out_cancel;
> }
> + if (treq->th_keyring) {
> + ret = nla_put_u32(msg, HANDSHAKE_A_ACCEPT_KEYRING,
> + treq->th_keyring);
> + if (ret < 0)
> + goto out_cancel;
> + }
>
> ret = nla_put_u32(msg, HANDSHAKE_A_ACCEPT_AUTH_MODE,
> treq->th_auth_mode);
--
Chuck Lever
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-07 18:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 9:40 [PATCH] net/handshake: Add new parameter 'HANDSHAKE_A_ACCEPT_KEYRING' hare
2025-05-07 15:35 ` Sagi Grimberg
2025-05-07 18:08 ` Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox