Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v1 00/27] Convert server NFSv2 XDR layer to xdrgen
@ 2026-09-16  0:41 Chuck Lever
  2026-09-16  0:43 ` Chuck Lever
  0 siblings, 1 reply; 2+ messages in thread
From: Chuck Lever @ 2026-09-16  0:41 UTC (permalink / raw)
  To: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey; +Cc: linux-nfs

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


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

end of thread, other threads:[~2026-09-16  0:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16  0:41 [PATCH v1 00/27] Convert server NFSv2 XDR layer to xdrgen Chuck Lever
2026-09-16  0:43 ` Chuck Lever

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