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 01/10] nfsdctl: sync nfsd_netlink.h with the kernel
Date: Mon, 14 Sep 2026 12:00:29 -0400 [thread overview]
Message-ID: <20260914-nfsdctl-rpcb-v2-1-b2c679ac0107@kernel.org> (raw)
In-Reply-To: <20260914-nfsdctl-rpcb-v2-0-b2c679ac0107@kernel.org>
Import the attributes that let a caller own rpcbind registration:
- NFSD_A_SERVER_SOCK_USERSPACE_RPCBIND on the request
- NFSD_A_SERVER_SOCK_RPCBIND, and the NFSD_A_RPCBIND_* nest, on the reply
The file comes from include/uapi/linux/nfsd_netlink.h. No code reads the
new attributes yet.
Bump the USE_SYSTEM_NFSD_NETLINK_H probe to one of the new attributes.
It tested NFSD_CMD_SERVER_STATS_GET, which has been in the uapi header
since v6.9, so any host with headers that new picks the system copy and
loses everything imported here.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
configure.ac | 2 +-
support/include/nfsd_netlink.h | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 2ce1e129e5d4..d9d268975d7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -259,7 +259,7 @@ AC_CHECK_HEADERS(linux/nfsd_netlink.h)
# ensure the system netlink headers have the latest features
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/nfsd_netlink.h>]],
- [[int foo = NFSD_CMD_SERVER_STATS_GET;]])],
+ [[int foo = NFSD_A_SERVER_SOCK_USERSPACE_RPCBIND;]])],
[AC_DEFINE([USE_SYSTEM_NFSD_NETLINK_H], 1,
["Use system's linux/nfsd_netlink.h"])])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/lockd_netlink.h>]],
diff --git a/support/include/nfsd_netlink.h b/support/include/nfsd_netlink.h
index 87da1d0bb21e..400322857d16 100644
--- a/support/include/nfsd_netlink.h
+++ b/support/include/nfsd_netlink.h
@@ -50,6 +50,13 @@ enum nfsd_xprtsec_mode {
NFSD_XPRTSEC_MODE_MTLS = 4,
};
+/*
+ * Constraints that apply to an rpcbind registration.
+ */
+enum nfsd_rpcbind_flags {
+ NFSD_RPCBIND_FLAGS_NO_UDP = 1,
+};
+
enum {
NFSD_A_CACHE_NOTIFY_CACHE_TYPE = 1,
@@ -113,8 +120,19 @@ enum {
NFSD_A_SOCK_MAX = (__NFSD_A_SOCK_MAX - 1)
};
+enum {
+ NFSD_A_RPCBIND_PROGRAM = 1,
+ NFSD_A_RPCBIND_VERSION,
+ NFSD_A_RPCBIND_FLAGS,
+
+ __NFSD_A_RPCBIND_MAX,
+ NFSD_A_RPCBIND_MAX = (__NFSD_A_RPCBIND_MAX - 1)
+};
+
enum {
NFSD_A_SERVER_SOCK_ADDR = 1,
+ NFSD_A_SERVER_SOCK_USERSPACE_RPCBIND,
+ NFSD_A_SERVER_SOCK_RPCBIND,
__NFSD_A_SERVER_SOCK_MAX,
NFSD_A_SERVER_SOCK_MAX = (__NFSD_A_SERVER_SOCK_MAX - 1)
--
2.55.0
next prev parent 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 [PATCH RFC nfs-utils v2 00/10] nfsdctl: allow it to handle rpcbind registration and deregistration Jeff Layton
2026-09-14 16:00 ` Jeff Layton [this message]
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-1-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.