From: Chuck Lever <cel@kernel.org>
To: NeilBrown <neil@brown.name>, Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: <linux-nfs@vger.kernel.org>
Subject: [PATCH v1 00/27] Convert server NFSv2 XDR layer to xdrgen
Date: Tue, 15 Sep 2026 20:41:30 -0400 [thread overview]
Message-ID: <20260916004141.141884-1-cel@kernel.org> (raw)
The series replaces NFSD's NFSv2 hand-written XDR encoders and
decoders with code that was generated mechanically from the RPC
language definition of NFSv2.
The eventual goal is to convert as much of NFSD's XDR layer to
mechanically-derived code as possible to reduce the risks of human
error and memory safety vulnerabilities on the front-line between
network and internal implementation.
Following this series, the next conversion steps are: NFSv3,
NFS_ACLv2, NFS_ACLv3.
I've tested this with some simple fstests runs on NFSv2. No new
issues were found.
Chuck Lever (27):
Documentation: Add the RPC language description of NFSv2
NFSD: Add infrastructure for generating NFSv2 XDR encoders and
decoders
NFSD: Use xdrgen-generated NFSv2 protocol definitions
NFSD: Remove '#include "xdr.h"' from fs/nfsd/xdr3.h
NFSD: Relocate the NFSv2 XDR storage union into nfsproc.c
NFSD: Use xdrgen XDR functions for the NFSv2 NULL procedure
NFSD: Use xdrgen XDR functions for NFSv2 GETATTR procedure
NFSD: Use xdrgen XDR functions for NFSv2 SETATTR procedure
NFSD: Use xdrgen XDR functions for the NFSv2 ROOT procedure
NFSD: Use xdrgen XDR functions for the NFSv2 LOOKUP procedure
NFSD: Use xdrgen XDR functions for NFSv2 READLINK procedure
NFSD: Use xdrgen XDR functions for NFSv2 READ procedure
NFSD: Use xdrgen XDR functions for the NFSv2 WRITECACHE procedure
NFSD: Use xdrgen XDR functions for NFSv2 WRITE procedure
NFSD: Refactor nfsd_proc_create()
NFSD: Use xdrgen XDR functions for NFSv2 CREATE procedure
NFSD: Use xdrgen XDR functions for the NFSv2 REMOVE procedure
NFSD: Use xdrgen XDR functions for the NFSv2 RENAME procedure
NFSD: Use xdrgen XDR functions for the NFSv2 LINK procedure
NFSD: Use xdrgen XDR functions for NFSv2 SYMLINK procedure
NFSD: Use xdrgen XDR functions for NFSv2 MKDIR procedure
NFSD: Use xdrgen XDR functions for NFSv2 RMDIR procedure
NFSD: Use xdrgen XDR functions for the NFSv2 STATFS procedure
NFSD: Use xdrgen XDR functions for NFSv2 READDIR arguments
NFSD: Add a streaming directory reader
NFSD: Refactor NFSv2 directory cookie encoding
NFSD: Use xdrgen XDR functions for NFSv2 READDIR results
Documentation/sunrpc/xdr/nfs2.x | 254 +++++
fs/nfs_common/common.c | 5 +-
fs/nfsd/Makefile | 15 +-
fs/nfsd/nfs2acl.c | 2 +-
fs/nfsd/nfs2xdr_gen.c | 1079 +++++++++++++++++++
fs/nfsd/nfs2xdr_gen.h | 46 +
fs/nfsd/nfs3xdr.c | 2 +
fs/nfsd/nfsd.h | 2 -
fs/nfsd/nfserr.h | 2 +-
fs/nfsd/nfsfh.h | 5 +
fs/nfsd/nfsproc.c | 1574 +++++++++++++++++++---------
fs/nfsd/nfsxdr.c | 605 +++--------
fs/nfsd/vfs.c | 239 +++--
fs/nfsd/vfs.h | 40 +
fs/nfsd/xdr.h | 167 +--
fs/nfsd/xdr3.h | 3 +-
include/linux/nfs_common.h | 4 +-
include/linux/sunrpc/xdrgen/nfs2.h | 298 ++++++
18 files changed, 3121 insertions(+), 1221 deletions(-)
create mode 100644 Documentation/sunrpc/xdr/nfs2.x
create mode 100644 fs/nfsd/nfs2xdr_gen.c
create mode 100644 fs/nfsd/nfs2xdr_gen.h
create mode 100644 include/linux/sunrpc/xdrgen/nfs2.h
--
2.55.0
next reply other threads:[~2026-09-16 0:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 0:41 Chuck Lever [this message]
2026-09-16 0:43 ` [PATCH v1 00/27] Convert server NFSv2 XDR layer to xdrgen 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=20260916004141.141884-1-cel@kernel.org \
--to=cel@kernel.org \
--cc=dai.ngo@oracle.com \
--cc=jlayton@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox