linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Define common macro NFS4_MAXTAGLEN for nfs/nfsd
@ 2015-03-28 15:46 Kinglong Mee
  2015-03-28 15:48 ` [PATCH 1/4] nfs: define NFS4_MAXTAGLEN to OPAQUE limits Kinglong Mee
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Kinglong Mee @ 2015-03-28 15:46 UTC (permalink / raw)
  To: J. Bruce Fields, Trond Myklebust; +Cc: Linux NFS Mailing List, Kinglong Mee

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(-)

-- 
2.3.4


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

end of thread, other threads:[~2015-04-29 20:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-28 15:46 [PATCH 0/4] Define common macro NFS4_MAXTAGLEN for nfs/nfsd Kinglong Mee
2015-03-28 15:48 ` [PATCH 1/4] nfs: define NFS4_MAXTAGLEN to OPAQUE limits Kinglong Mee
2015-04-29 19:56   ` J. Bruce Fields
2015-03-28 15:49 ` [PATCH 2/4] nfs: use NFS4_MAXTAGLEN for cb_taglen checking Kinglong Mee
2015-03-28 15:50 ` [PATCH 3/4] nfsd: use NFS4_MAXTAGLEN for taglen checking Kinglong Mee
2015-03-28 15:51 ` [PATCH 4/4] nfsd: use NFS4_MAXTAGLEN defined in include/linux/nfs4.h Kinglong Mee
2015-04-29 20:25 ` [PATCH 0/4] Define common macro NFS4_MAXTAGLEN for nfs/nfsd J. Bruce Fields
2015-04-29 20:28   ` Chuck Lever
2015-04-29 20:29   ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).