summary refs log tree commit diff
path: root/fs/lockd/Makefile
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2010-12-14 14:55:40 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-12-16 12:37:21 -0500
commit2b061f9ef216b6d229b06267f188167fd6ab3d9b (patch)
tree8ed08aa5bee3a50ac7bf9909e7fc8865b470b0a3 /fs/lockd/Makefile
parent5f96e5e31b4f4a2f126adfe0586a7555c11b0562 (diff)
downloadlinux-2b061f9ef216b6d229b06267f188167fd6ab3d9b.tar.gz
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>
Diffstat (limited to 'fs/lockd/Makefile')
-rw-r--r--fs/lockd/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/lockd/Makefile b/fs/lockd/Makefile
index 97f6073ab339..d0488b3bd00b 100644
--- a/fs/lockd/Makefile
+++ b/fs/lockd/Makefile
@@ -4,7 +4,7 @@
 
 obj-$(CONFIG_LOCKD) += lockd.o
 
-lockd-objs-y := clntlock.o clntproc.o host.o svc.o svclock.o svcshare.o \
-	        svcproc.o svcsubs.o mon.o xdr.o grace.o
+lockd-objs-y := clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o \
+	        svcshare.o svcproc.o svcsubs.o mon.o xdr.o grace.o
 lockd-objs-$(CONFIG_LOCKD_V4) += xdr4.o svc4proc.o
 lockd-objs		      := $(lockd-objs-y)