Skip to content

Modernize NFSv2 XDR encoder/decoders

Chuck Lever linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24SUNRPC: Refactor logic to NUL-terminate strings in pagesfs/nfs/nfs2xdr.c fs/nfs/nfs3xdr.c fs/nfs/nfs4xdr.c +2 more+21 -140 replies
2/24NFS: Introduce XDR helpers for basic NFSv2 data typesfs/nfs/nfs2xdr.c+342 -00 replies
3/24NFS: Encode NFSv2 fhandle argument using an xdr_streamfs/nfs/nfs2xdr.c+10 -00 replies
4/24NFS: Encode v2 setattr argument using an xdr_streamfs/nfs/nfs2xdr.c+19 -00 replies
5/24NFS: Encode dirop argument using an xdr_streamfs/nfs/nfs2xdr.c+20 -00 replies
6/24NFS: Encode NFSv2 readlink argument using an xdr_streamfs/nfs/nfs2xdr.c+17 -00 replies
7/24NFS: Encode NFSv2 read argument using an xdr_streamfs/nfs/nfs2xdr.c+35 -00 replies
8/24NFS: Encode NFSv2 write argument using an xdr_streamfs/nfs/nfs2xdr.c+35 -00 replies
9/24NFS: Encode NFSv2 create argument using an xdr_streamfs/nfs/nfs2xdr.c+19 -00 replies
10/24NFS: Encode NFSv2 rename argument using an xdr_streamfs/nfs/nfs2xdr.c+19 -00 replies
11/24NFS: Encode NFSv2 link argument using an xdr_streamfs/nfs/nfs2xdr.c+19 -00 replies
12/24NFS: Encode NFSv2 symlink argument using an xdr_streamfs/nfs/nfs2xdr.c+21 -00 replies
13/24NFS: Encode NFSv2 readdir argument using an xdr_streamfs/nfs/nfs2xdr.c+30 -00 replies
14/24NFS: Replace old NFSv2 encoder functions with xdr_stream-based onesfs/nfs/nfs2xdr.c+1 -2720 replies
15/24NFS: Use the "nfs_stat" enum for nfs_stat_to_errno()fs/nfs/internal.h fs/nfs/nfs2xdr.c+10 -80 replies
16/24NFS: Decode NFSv2 stat reply using an xdr_streamfs/nfs/nfs2xdr.c+14 -00 replies
17/24NFS: Decode NFSv2 attrstat reply using an xdr_streamfs/nfs/nfs2xdr.c+24 -00 replies
18/24NFS: Decode NFSv2 dirop reply using an xdr_streamfs/nfs/nfs2xdr.c+27 -00 replies
19/24NFS: Decode NFSv2 readlink reply using an xdr_streamfs/nfs/nfs2xdr.c+24 -00 replies
20/24NFS: Decode NFSv2 read reply using an xdr_streamfs/nfs/nfs2xdr.c+49 -00 replies
21/24NFS: Decode NFSv2 write reply using an xdr_streamfs/nfs/nfs2xdr.c+19 -00 replies
22/24NFS: Decode NFSv2 readdir reply using an xdr_streamfs/nfs/nfs2xdr.c+152 -210 replies
23/24NFS: Decode NFSv2 statfs reply using an xdr_streamfs/nfs/nfs2xdr.c+41 -00 replies
24/24NFS: Replace old NFSv2 decoder functions with xdr_stream-based onesfs/nfs/nfs2xdr.c+1 -2960 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/24] Modernize NFSv2 XDR encoder/decoders

This series backports patches I did 3 years ago that update the NFS client's NFSv2 XDR encoders and decoders to use xdr_stream style marshalling, similar to NFSv4. The immediate advantage is better bounds checking during marshalling and unmarshalling.

I've already done the kernel's MNT client, lockd's NSM client, and the kernel's rpcbind client. Eventually, we should convert NFSv3 and NLM to use this style of marshalling XDR so that we can streamline call_encode() and call_decode().

---

Chuck Lever (24):
NFS: Replace old NFSv2 decoder functions with xdr_stream-based ones
NFS: Decode NFSv2 statfs reply using an xdr_stream
NFS: Decode NFSv2 readdir reply using an xdr_stream
NFS: Decode NFSv2 write reply using an xdr_stream
NFS: Decode NFSv2 read reply using an xdr_stream
NFS: Decode NFSv2 readlink reply using an xdr_stream
NFS: Decode NFSv2 dirop reply using an xdr_stream
NFS: Decode NFSv2 attrstat reply using an xdr_stream
NFS: Decode NFSv2 stat reply using an xdr_stream
NFS: Use the "nfs_stat" enum for nfs_stat_to_errno()
NFS: Replace old NFSv2 encoder functions with xdr_stream-based ones
NFS: Encode NFSv2 readdir argument using an xdr_stream
NFS: Encode NFSv2 symlink argument using an xdr_stream
NFS: Encode NFSv2 link argument using an xdr_stream
NFS: Encode NFSv2 rename argument using an xdr_stream
NFS: Encode NFSv2 create argument using an xdr_stream
NFS: Encode NFSv2 write argument using an xdr_stream
NFS: Encode NFSv2 read argument using an xdr_stream
NFS: Encode NFSv2 readlink argument using an xdr_stream
NFS: Encode dirop argument using an xdr_stream
NFS: Encode v2 setattr argument using an xdr_stream
NFS: Encode NFSv2 fhandle argument using an xdr_stream
NFS: Introduce XDR helpers for basic NFSv2 data types
SUNRPC: Refactor logic to NUL-terminate strings in pages

 fs/nfs/internal.h          |    2 
 fs/nfs/nfs2xdr.c           | 1169 +++++++++++++++++++++++++++++---------------
 fs/nfs/nfs3xdr.c           |    6 
 fs/nfs/nfs4xdr.c           |    5 
 include/linux/sunrpc/xdr.h |    1 
 net/sunrpc/xdr.c           |   17 +
 6 files changed, 779 insertions(+), 421 deletions(-)
Signature · 1 line
Chuck Lever