From: Mark Brown <broonie@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Anna Schumaker <anna.schumaker@hammerspace.com>,
Chuck Lever <cel@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the nfsd tree with the nfs-anna tree
Date: Tue, 22 Sep 2026 10:42:00 +0200 [thread overview]
Message-ID: <arI_WB7f4jx0kziZ@sirena.co.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]
Hi all,
Today's linux-next merge of the nfsd tree got a conflict in:
net/sunrpc/xprtsock.c
between commits:
ced837addad37 ("SUNRPC: fold xs_sock_process_cmsg() into its only caller")
2e3f0f157f227 ("SUNRPC: treat every client-side TLS error alert as fatal")
adc5399386f7b ("SUNRPC: reject a client-side TLS alert record that is not two octets")
from the nfs-anna tree and commits:
21bcc6ccc6cd0 ("SUNRPC: Fold xs_sock_process_cmsg() into its only caller")
6b91817001fb1 ("SUNRPC: Treat every client-side TLS error alert as fatal")
91bdf2ae4a279 ("SUNRPC: Reject a client-side TLS alert record that is not two octets")
from the nfsd tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
(The comments were different, I took nfs-anna's version)
diff --combined net/sunrpc/xprtsock.c
index f5a5136327ba8,ca22ca8f2fea7..0000000000000
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@@ -386,20 -386,17 +386,20 @@@ xs_sock_recv_cmsg(struct socket *sock,
if (tls_get_record_type(sock->sk, &u.cmsg) !=
TLS_RECORD_TYPE_ALERT)
return -EAGAIN;
- /* An Alert record carries exactly one two-octet message
- * (RFC 8446 Section 5.1). alert_kvec caps the receive at
- * two, so the count alone cannot reliably detect an
- * oversized record.
+ /* RFC 8446 Section 5.1: a record with an Alert type carries
+ * exactly one message, and an alert is two octets.
+ * tls_alert_recv() reads both without checking the length.
+ * alert_kvec caps the count at two, so a longer record
+ * fills it as well. kTLS sets MSG_EOR only once the
+ * record has been drained.
*/
if (ret != sizeof(alert) || !(msg.msg_flags & MSG_EOR))
return -EACCES;
iov_iter_revert(&msg.msg_iter, ret);
tls_alert_recv(sock->sk, &msg, &level, &description);
/* RFC 8446 Section 6: every alert but a closure alert is
- * an error alert.
+ * an error alert, whatever the legacy AlertLevel octet
+ * says.
*/
switch (description) {
case TLS_ALERT_DESC_CLOSE_NOTIFY:
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-09-22 8:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 8:42 Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-22 8:42 Mark Brown
2026-09-22 13:09 ` Chuck Lever
2025-10-02 11:08 Mark Brown
2020-05-29 1:05 Stephen Rothwell
2020-05-29 0:59 Stephen Rothwell
2020-05-29 19:27 ` Chuck Lever
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=arI_WB7f4jx0kziZ@sirena.co.uk \
--to=broonie@kernel.org \
--cc=anna.schumaker@hammerspace.com \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
/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
all inboxes | Powered by JetHome®