From: Jeff Layton <jlayton@kernel.org>
To: Steve Dickson <steved@redhat.com>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>, Chuck Lever <cel@kernel.org>,
NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org, Jeff Layton <jlayton@kernel.org>
Subject: [PATCH RFC nfs-utils v2 00/10] nfsdctl: allow it to handle rpcbind registration and deregistration
Date: Mon, 14 Sep 2026 12:00:28 -0400 [thread overview]
Message-ID: <20260914-nfsdctl-rpcb-v2-0-b2c679ac0107@kernel.org> (raw)
This version fixes some problems that Sashiko flagged in review.
This patchset adds support for NFSD_A_SERVER_SOCK_USERSPACE_RPCBIND,
which tells the kernel to not do rpcbind registration and to instead
allow userland to handle it. After setting listeners, nfsdctl will then
call out to rpcbind using the normal libtirpc client interfaces.
This is a companion set to the kernel set I recently posted (and which
also should have been marked RFC).
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v2:
- Fixes for bugs v1 introduced are folded into the patches that
introduced them. Three pre-existing bugs found along the way are
separate patches at the end, so the set is 10 patches instead of 7.
- "register nfsd listeners with rpcbind": register only once the
listener_set reply has been parsed. On a reply carrying no rpcbind
attributes the sweep cleared every NFS and NFSACL entry and put
nothing back, leaving a running server advertising nothing. Also
abort rather than send a listener_set that lost the ownership flag.
- "clear rpcbind entries when the serv is torn down" (was "... when the
last thread stops"): also sweep on the autostart teardown path.
- New, pre-existing: fix a heap overflow in autostart_func(). A failed
listener set zeroed the pool count before the thread array was sized,
but the array is filled from the nfs.conf list, so any [nfsd] threads
setting wrote past the allocation.
- New, pre-existing: reject a listener insertion when the table is full,
instead of writing one element past nfsd_sockets[].
- New, pre-existing: check the nla_put() calls in set_listeners().
- Link to v1: https://lore.kernel.org/r/20260910-nfsdctl-rpcb-v1-0-4bba1e7a3a43@kernel.org
---
Jeff Layton (10):
nfsdctl: sync nfsd_netlink.h with the kernel
nfsdctl: probe the policy of any command
nfsdctl: share the listener nest parser
nfsdctl: add rpcbind registration helpers
nfsdctl: register nfsd listeners with rpcbind
nfsdctl: clear rpcbind entries when the serv is torn down
nfsdctl: add missing break in update_listeners()
nfsdctl: fix heap overflow in autostart_func() listener cleanup
nfsdctl: reject a listener insertion when the table is full
nfsdctl: check the netlink attribute puts in set_listeners()
configure.ac | 2 +-
support/include/nfsd_netlink.h | 18 +++
utils/nfsdctl/Makefile.am | 10 +-
utils/nfsdctl/nfsdctl.8 | 16 +++
utils/nfsdctl/nfsdctl.adoc | 17 +++
utils/nfsdctl/nfsdctl.c | 256 +++++++++++++++++++++++++++++++++--------
utils/nfsdctl/rpcbind.c | 251 ++++++++++++++++++++++++++++++++++++++++
utils/nfsdctl/rpcbind.h | 42 +++++++
8 files changed, 562 insertions(+), 50 deletions(-)
---
base-commit: 630393e9c73667b3fda6a7507cb5171ec0ec38dc
change-id: 20260908-nfsdctl-rpcb-adc5a1fc090b
Best regards,
--
Jeff Layton <jlayton@kernel.org>
next reply other threads:[~2026-09-14 16:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 16:00 Jeff Layton [this message]
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 01/10] nfsdctl: sync nfsd_netlink.h with the kernel Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 02/10] nfsdctl: probe the policy of any command Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 03/10] nfsdctl: share the listener nest parser Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 04/10] nfsdctl: add rpcbind registration helpers Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 05/10] nfsdctl: register nfsd listeners with rpcbind Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 06/10] nfsdctl: clear rpcbind entries when the serv is torn down Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 07/10] nfsdctl: add missing break in update_listeners() Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 08/10] nfsdctl: fix heap overflow in autostart_func() listener cleanup Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 09/10] nfsdctl: reject a listener insertion when the table is full Jeff Layton
2026-09-14 16:00 ` [PATCH RFC nfs-utils v2 10/10] nfsdctl: check the netlink attribute puts in set_listeners() Jeff Layton
2026-09-14 16:05 ` [PATCH RFC nfs-utils v2 00/10] nfsdctl: allow it to handle rpcbind registration and deregistration Jeff Layton
2026-09-18 7:38 ` Steve Dickson
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=20260914-nfsdctl-rpcb-v2-0-b2c679ac0107@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=cel@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=steved@redhat.com \
--cc=tom@talpey.com \
--cc=trondmy@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 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.