Skip to content

Define common macro NFS4_MAXTAGLEN for nfs/nfsd

Kinglong Mee linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4nfs: define NFS4_MAXTAGLEN to OPAQUE limitsfs/nfs/nfs4xdr.c include/linux/nfs4.h+1 -71 reply
2/4nfs: use NFS4_MAXTAGLEN for cb_taglen checkingfs/nfs/callback_xdr.c+2 -30 replies
3/4nfsd: use NFS4_MAXTAGLEN for taglen checkingfs/nfsd/nfs4xdr.c fs/nfsd/xdr4.h+1 -20 replies
4/4nfsd: use NFS4_MAXTAGLEN defined in include/linux/nfs4.hfs/nfsd/xdr4cb.h+2 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] Define common macro NFS4_MAXTAGLEN for nfs/nfsd

There are four macro defines for max tag length,
in fs/nfs/nfs4xdr.c,
/* NFSv4 COMPOUND tags are only wanted for debugging purposes */ #ifdef DEBUG
#define NFS4_MAXTAGLEN 20
#else
#define NFS4_MAXTAGLEN 0
#endif

in fs/nfs/callback_xdr.c,
#define CB_OP_TAGLEN_MAXSZ (512)

in fs/nfsd/xdr4.h,
#define NFSD4_MAX_TAGLEN 128

in fs/nfsd/xdr4cb.h,
#define NFS4_MAXTAGLEN 20

But, according to rfc3530 and rfc5661, all the length should be limited by opaque limited.

The patch site defines a common macro named NFS4_MAXTAGLEN for all of them, limited to opaque limited.

Kinglong Mee (4):
nfs: define NFS4_MAXTAGLEN to OPAQUE limits
nfs: use NFS4_MAXTAGLEN for cb_taglen checking
nfsd: use NFS4_MAXTAGLEN for nfsd taglen checking
nfsd: use NFS4_MAXTAGLEN defined in include/linux/nfs4.h

 fs/nfs/callback_xdr.c | 5 ++---
 fs/nfs/nfs4xdr.c      | 7 -------
 fs/nfsd/nfs4xdr.c     | 2 +-
 fs/nfsd/xdr4.h        | 1 -
 fs/nfsd/xdr4cb.h      | 3 ++-
 include/linux/nfs4.h  | 1 +
 6 files changed, 6 insertions(+), 13 deletions(-)
Signature · 1 line
2.3.4