1
0
Fork 0
alistair23-linux/fs/lockd
Chuck Lever 2b061f9ef2 lockd: Introduce new-style XDR functions for NLMv3
We'd like to prevent local buffer overflows caused by malicious or
broken servers.  New xdr_stream style decoders can do that.

For efficiency, we also eventually want to be able to pass xdr_streams
from call_encode() and call_decode() to all XDR encoding functions,
rather than building an xdr_stream in every XDR encoding and decoding
function in the kernel.

To do all of this, rewrite the XDR encoding and decoding functions in
fs/lockd/xdr.c to use xdr_streams.  This makes them more or less
incompatible with server-side XDR helper functions, so break them out
into a separate source file.

Static helper functions are left without the "inline" directive.  This
allows the compiler to choose automatically how to optimize these for
size or speed.

SHARE-related functionality doesn't seem to be used, as those
functions are hiding behind a #define that isn't set anywhere that I
can find.  And, they've been in there forever (at least as far back as
the kernel's git history goes), yet remain unused.  Let's take the
opportunity to bin them.  It should be easy enough for someone to
introduce proper XDR functions if at some point SHARE-related NLM
functionality is desired.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-12-16 12:37:21 -05:00
..
Makefile lockd: Introduce new-style XDR functions for NLMv3 2010-12-16 12:37:21 -05:00
clntlock.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
clntproc.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
clntxdr.c lockd: Introduce new-style XDR functions for NLMv3 2010-12-16 12:37:21 -05:00
grace.c nfsd: common grace period control 2008-10-03 16:19:02 -04:00
host.c NLM: Fix a regression in lockd 2010-11-15 20:44:26 -05:00
mon.c sunrpc: Add net to rpc_create_args 2010-10-01 17:18:56 -04:00
svc.c lockd: push lock_flocks down 2010-10-27 21:39:39 +02:00
svc4proc.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
svclock.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
svcproc.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
svcshare.c lockd: fix sparse warning in svcshare.c 2008-04-23 16:13:39 -04:00
svcsubs.c lockd: push lock_flocks down 2010-10-27 21:39:39 +02:00
xdr.c lockd: Introduce new-style XDR functions for NLMv3 2010-12-16 12:37:21 -05:00
xdr4.c headers: utsname.h redux 2009-09-23 18:13:10 -07:00