Thread (22 messages) 22 messages, 6 authors, 2025-09-17

Re: [PATCH v2 5/7] net/handshake: Support KeyUpdate message types

From: Simon Horman <horms@kernel.org>
Date: 2025-09-05 13:23:30
Also in: linux-doc, linux-nfs, linux-nvme, lkml

On Fri, Sep 05, 2025 at 12:46:57PM +1000, alistair23@gmail.com wrote:
From: Alistair Francis <redacted>

When reporting the msg-type to userspace let's also support reporting
KeyUpdate events. This supports reporting a client/server event and if
the other side requested a KeyUpdateRequest.

Link: https://datatracker.ietf.org/doc/html/rfc8446#section-4.6.3
Signed-off-by: Alistair Francis <redacted>
...
quoted hunk ↗ jump to hunk
diff --git a/Documentation/netlink/specs/handshake.yaml b/Documentation/netlink/specs/handshake.yaml
index a273bc74d26f..1a3312fad410 100644
--- a/Documentation/netlink/specs/handshake.yaml
+++ b/Documentation/netlink/specs/handshake.yaml
@@ -21,12 +21,17 @@ definitions:
     type: enum
     name: msg-type
     value-start: 0
-    entries: [unspec, clienthello, serverhello]
+    entries: [unspec, clienthello, serverhello, clientkeyupdate, clientkeyupdaterequest, serverkeyupdate, serverkeyupdaterequest]
   -
This line seems excessively long.
The preference is for lines no longer than 80 characters wide.

Flagged by yamllint.

...
quoted hunk ↗ jump to hunk
diff --git a/net/handshake/tlshd.c b/net/handshake/tlshd.c
...
quoted hunk ↗ jump to hunk
@@ -348,7 +361,8 @@ EXPORT_SYMBOL(tls_client_hello_x509);
  *   %-ESRCH: No user agent is available
  *   %-ENOMEM: Memory allocation failed
  */
Please also add keyupdate to the Kernel doc for this function.

Flagged by ./scripts/kernel-doc --none
-int tls_client_hello_psk(const struct tls_handshake_args *args, gfp_t flags)
+int tls_client_hello_psk(const struct tls_handshake_args *args, gfp_t flags,
+			 handshake_key_update_type keyupdate)
 {
 	struct tls_handshake_req *treq;
 	struct handshake_req *req;
...
quoted hunk ↗ jump to hunk
@@ -410,7 +428,8 @@ EXPORT_SYMBOL(tls_server_hello_x509);
  *   %-ESRCH: No user agent is available
  *   %-ENOMEM: Memory allocation failed
  */
Ditto.
-int tls_server_hello_psk(const struct tls_handshake_args *args, gfp_t flags)
+int tls_server_hello_psk(const struct tls_handshake_args *args, gfp_t flags,
+			 handshake_key_update_type keyupdate)
 {
 	struct tls_handshake_req *treq;
 	struct handshake_req *req;
...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help