Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Bjoern Doebel <doebel@amazon.de>
To: Sasha Levin <sashal@kernel.org>
Cc: Bjoern Doebel <doebel@amazon.de>, <stable@vger.kernel.org>,
	Chuck Lever <cel@kernel.org>
Subject: Re: [PATCH 5.10.y v2] SUNRPC: Copy the deferred RPC Call from the head buffer
Date: Fri, 13 Nov 2026 17:24:53 +0000	[thread overview]
Message-ID: <20261113172457.222949-1-doebel@amazon.de> (raw)
In-Reply-To: <daily-reply-2026-11-12-5417451315@kernel.org>

Hi Sasha,

thanks for raising this. I sent a v3 earlier in this thread ([PATCH
5.10.y v3]) that reworks the backport instead of applying the upstream
mechanics.

The short version: on 5.10, header parsing advances rq_arg.head[0]
via svc_getnl() without updating xdr_buf::len, so
rq_arg.len > head[0].iov_len for every Call at svc_defer() time. The
upstream guard would refuse every deferral, and copying from
head[0].iov_base would drop the headers svc_deferred_recv() expects.
v3 therefore keeps the skip-based snapshot and refuses deferral only
once a GSS integrity/privacy unwrap has run (rq_auth_slack != 0) or
when len < head[0].iov_len, since gss_unwrap_kerberos_v2() resets
buf->len.

The same rework applies to 5.15 and 6.1. The assumption upstream relies
on only holds since header parsing moved to xdr_stream in v6.3
(163cdfca341b7, "SUNRPC: Decode most of RPC header with xdr_stream");
5.15 and 6.1 still use svc_getnl(). I see the verbatim patch is
already queued for both trees - it will refuse all deferrals there,
just like my v2 would have on 5.10.

Want me to send v3-style backports for 5.15.y and 6.1.y?

Best regards,
Bjoern

      parent reply	other threads:[~2026-11-13 17:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 18:54 FAILED: patch "[PATCH] SUNRPC: Copy the deferred RPC Call from the head buffer" failed to apply to 5.10-stable tree gregkh
2026-11-12 13:40 ` [PATCH 5.10.y] SUNRPC: Copy the deferred RPC Call from the head buffer Bjoern Doebel
2026-11-12 13:55   ` [PATCH 5.10.y v2] " Bjoern Doebel
2026-11-13  2:33     ` Sasha Levin
2026-11-13 10:24       ` [PATCH 5.10.y v3] " Bjoern Doebel
2026-11-13 19:09         ` Sasha Levin
2026-11-13 17:24       ` Bjoern Doebel [this message]

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=20261113172457.222949-1-doebel@amazon.de \
    --to=doebel@amazon.de \
    --cc=cel@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@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