Netdev List
 help / color / mirror / Atom feed
* [PATCH v2 0/5] nfsd/sunrpc: allow userland to handle rpcbind registration
@ 2026-09-14 15:20 Jeff Layton
  2026-09-14 15:20 ` [PATCH v2 1/5] SUNRPC: allow a service to opt out of " Jeff Layton
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jeff Layton @ 2026-09-14 15:20 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker, Chuck Lever, NeilBrown,
	Olga Kornievskaia, Dai Ngo, Tom Talpey, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Donald Hunter, Shuah Khan
  Cc: linux-nfs, linux-kernel, netdev, linux-kselftest, Jeff Layton

While working on the recent hardening patches for the nfsd listener
netlink interface, Chuck mentioned that we could allow userland to
handle rpcbind registation itself.

This adds such a mechanism to the netlink listener set interface. The
main idea is to add a new optional flag to the netlink downcall that
tells the kernel to skip rpcbind registration altogether for the nfsd
listeners.

Note that NLM registration is not affected and is still handled by the
kernel.  Handling that is trickier since it can be started by the
client.

Patches to nfsdctl will follow.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v2:
- Refuse the legacy portlist add-fd write against a userspace-rpcbind
  serv. nfsd_create_serv() cannot flip ownership back for an existing
  serv, svc_addsock() expects svc_register() to register the listener,
  and there is no way to tell the rpcbind owner about it.
- selftests: require NFSv3 in the reply and skip where NFSv4 is not
  built, rather than passing when neither is present.
- selftests: cover the portlist refusal.
- Link to v1: https://lore.kernel.org/r/20260910-nfsd-norpcb-v1-0-b4d5182d634c@kernel.org

---
Jeff Layton (5):
      SUNRPC: allow a service to opt out of rpcbind registration
      NFSD: add a userspace-rpcbind flag to listener_set
      NFSD: honour the userspace-rpcbind flag in listener_set
      NFSD: report registerable programs in the listener_set reply
      selftests/nfsd: exercise the userspace-rpcbind listener_set flag

 Documentation/netlink/specs/nfsd.yaml              |  55 +++-
 fs/nfsd/netlink.c                                  |   5 +-
 fs/nfsd/nfsctl.c                                   | 169 +++++++++-
 fs/nfsd/nfsd.h                                     |   4 +-
 fs/nfsd/nfssvc.c                                   |  67 ++--
 include/linux/sunrpc/svc.h                         |   2 +
 include/uapi/linux/nfsd_netlink.h                  |  20 ++
 net/sunrpc/svc.c                                   |   5 +
 net/sunrpc/svc_xprt.c                              |   2 +-
 .../testing/selftests/nfsd/nfsd_netlink_listener.c | 361 ++++++++++++++++++++-
 10 files changed, 655 insertions(+), 35 deletions(-)
---
base-commit: 4d46e877c21d07ddcad03da7f3b05ad2cc22b5b3
change-id: 20260903-nfsd-norpcb-21cdcaf246bb

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-14 15:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 15:20 [PATCH v2 0/5] nfsd/sunrpc: allow userland to handle rpcbind registration Jeff Layton
2026-09-14 15:20 ` [PATCH v2 1/5] SUNRPC: allow a service to opt out of " Jeff Layton
2026-09-14 15:20 ` [PATCH v2 2/5] NFSD: add a userspace-rpcbind flag to listener_set Jeff Layton
2026-09-14 15:20 ` [PATCH v2 3/5] NFSD: honour the userspace-rpcbind flag in listener_set Jeff Layton
2026-09-14 15:20 ` [PATCH v2 4/5] NFSD: report registerable programs in the listener_set reply Jeff Layton
2026-09-14 15:20 ` [PATCH v2 5/5] selftests/nfsd: exercise the userspace-rpcbind listener_set flag Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox