From: Ameer Hamza <ameer.hamza@truenas.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: cel@kernel.org, neil@brown.name, okorniev@redhat.com,
Dai.Ngo@oracle.com, tom@talpey.com, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org, alexander.motin@truenas.com,
caleb.stjohn@truenas.com
Subject: Re: [PATCH v2 0/2] sunrpc: don't strip a uid's groups when the mountd group lookup fails
Date: Sat, 15 Aug 2026 17:31:47 +0500 [thread overview]
Message-ID: <aoBb18TpdIe77NOI@hamza-PC> (raw)
In-Reply-To: <3b34e782725fed9a661a4c77ab875f1bd755fcd8.camel@kernel.org>
On Sat, Aug 15, 2026 at 06:50:48AM -0400, Jeff Layton wrote:
> On Sat, 2026-08-15 at 03:19 +0500, Ameer Hamza wrote:
> > On a server running rpc.mountd with --manage-gids, a transient
> > name-service failure makes mountd answer the auth.unix.gid upcall
> > with a zero-group reply, which the kernel installs as a valid
> > positive entry. Patch 1 records such replies as negative entries
> > on the classic /proc channel, so the credential keeps the groups
> > it already carries. Patch 2 does the same for the netlink upcall,
> > which has an explicit NEGATIVE flag the parser does not propagate.
> >
> > One observation from reviewing the netlink path: in steady-state
> > netlink-only operation, mountd currently receives no unix_gid
> > upcalls, because unix_gid_upcall() still gates request generation
> > on cache_listeners_exist(), which counts only classic-channel
> > writers, and netlink-mode mountd opens no /proc channels. A
> > flagged reply reaches the parser today only via the 30-second
> > post-close grace window, a concurrent classic-channel writer, or
> > a direct SUNRPC_CMD_UNIX_GID_SET_REQS. Patch 2 fixes the parser
> > semantics ahead of that; making upcall generation netlink-aware
> > needs a per-cache listener signal (mountd subscribes to the
> > notification group even without --manage-gids) and is left for a
> > separate, runtime-tested series.
> >
>
> Do you intend to send the separate series for this?
Not at the moment. I may take a look later if it is still open.
Thanks for the review.
>
> > Patch 1 was tested on a live 6.12 server over NFSv3 and v4.0-v4.2
> > with sec=sys and sec=krb5, and applies unmodified to every
> > maintained stable tree, 5.10.y through 7.1.y. Patch 2 is build-
> > and static-checked (sparse, W=1) but not runtime-tested.
> >
> > Changes since v1:
> > - split the netlink fix into its own patch with its own Fixes:
> > tag, as requested by Chuck
> > - patch 1 is unchanged
> >
> > v1: https://lore.kernel.org/linux-nfs/20260814172507.1474519-1-ameer.hamza@truenas.com/
> >
> > Ameer Hamza (2):
> > sunrpc: treat empty auth.unix.gid replies as negative entries
> > sunrpc: honor the netlink unix_gid NEGATIVE flag
> >
> > net/sunrpc/svcauth_unix.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> >
> > base-commit: 46db3c8a1be96a354758b44b1d4fbb4b70d09a20
>
> Good catch. Both of these look good to me.
> --
> Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2026-08-15 12:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 22:19 [PATCH v2 0/2] sunrpc: don't strip a uid's groups when the mountd group lookup fails Ameer Hamza
2026-08-14 22:19 ` [PATCH v2 1/2] sunrpc: treat empty auth.unix.gid replies as negative entries Ameer Hamza
2026-08-14 22:19 ` [PATCH v2 2/2] sunrpc: honor the netlink unix_gid NEGATIVE flag Ameer Hamza
2026-08-15 10:50 ` [PATCH v2 0/2] sunrpc: don't strip a uid's groups when the mountd group lookup fails Jeff Layton
2026-08-15 12:31 ` Ameer Hamza [this message]
2026-08-15 16:24 ` 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=aoBb18TpdIe77NOI@hamza-PC \
--to=ameer.hamza@truenas.com \
--cc=Dai.Ngo@oracle.com \
--cc=alexander.motin@truenas.com \
--cc=caleb.stjohn@truenas.com \
--cc=cel@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.