From: Henrique Carvalho <henrique.carvalho@suse.com>
To: linux-cifs@vger.kernel.org
Cc: sfrench@samba.org, linkinjeon@kernel.org, metze@samba.org,
pc@manguebit.com, ronniesahlberg@gmail.com,
sprasad@microsoft.com, tom@talpey.com, bharathsm@microsoft.com,
ematsumiya@suse.de,
Henrique Carvalho <henrique.carvalho@suse.com>
Subject: [PATCH v2 01/11] smb: common: add smb_tls struct shared by client and server
Date: Tue, 28 Apr 2026 12:55:39 -0300 [thread overview]
Message-ID: <20260428155542.226234-2-henrique.carvalho@suse.com> (raw)
In-Reply-To: <20260428155542.226234-1-henrique.carvalho@suse.com>
Both the SMB client (mount path) and ksmbd server (accept path) need
to drive a TLS handshake over their accepted/connected QUIC socket
via the kernel handshake API.
Pull the small bit of state shared between the two callers - the
completion, status and peerid populated by the handshake callback,
and the tls_handshake_args structure passed to
tls_{client,server}_hello_x509() - into one common header in
fs/smb/common/smbglob.h.
Define SMB_TLS_TIMEOUT_MS (3000) here as well so client and server
agree on the handshake timeout.
Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
---
fs/smb/common/smbglob.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/smb/common/smbglob.h b/fs/smb/common/smbglob.h
index 4e33d91cdc9d..a08d804af0ed 100644
--- a/fs/smb/common/smbglob.h
+++ b/fs/smb/common/smbglob.h
@@ -11,6 +11,9 @@
#ifndef _COMMON_SMB_GLOB_H
#define _COMMON_SMB_GLOB_H
+#include <net/sock.h>
+#include <net/handshake.h>
+
struct smb_version_values {
char *version_string;
__u16 protocol_id;
@@ -66,4 +69,13 @@ static inline void inc_rfc1001_len(void *buf, int count)
#define MAX_CIFS_SMALL_BUFFER_SIZE 448 /* big enough for most */
+struct smb_tls {
+ struct completion handshake_done;
+ int status;
+ key_serial_t peerid;
+ struct tls_handshake_args args;
+};
+
+#define SMB_TLS_TIMEOUT_MS 3000
+
#endif /* _COMMON_SMB_GLOB_H */
--
2.53.0
next prev parent reply other threads:[~2026-04-28 15:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 15:55 [PATCH v2 00/11] smb: implement SMB over QUIC Henrique Carvalho
2026-04-28 15:55 ` Henrique Carvalho [this message]
2026-04-28 15:55 ` [PATCH v2 02/11] smb: client: refactor negotiate context assembly Henrique Carvalho
2026-04-28 15:55 ` [PATCH v2 03/11] smb: client: prepare connect path for QUIC transport Henrique Carvalho
2026-04-28 15:55 ` [PATCH v2 04/11] smb: client: add QUIC mount and transport setup Henrique Carvalho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260428155542.226234-2-henrique.carvalho@suse.com \
--to=henrique.carvalho@suse.com \
--cc=bharathsm@microsoft.com \
--cc=ematsumiya@suse.de \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=metze@samba.org \
--cc=pc@manguebit.com \
--cc=ronniesahlberg@gmail.com \
--cc=sfrench@samba.org \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).