NFS: Introduce new-style XDR decoding functions for NFSv2
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Dec 2010 14:56:30 +0000 (14:56 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 16 Dec 2010 17:37:23 +0000 (12:37 -0500)
commite4f9323409369a3aeb01885c0c4409d2eeec794a
tree67fffcae54825264e5d908ef72ffb89870670bbd
parent9d5a64343925a152e1907c652a0d71d6640868b3
NFS: Introduce new-style XDR decoding functions for NFSv2

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_decode() to all XDR decoding functions, rather than building
an xdr_stream in every XDR decoding function in the kernel.

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

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>
fs/nfs/nfs3xdr.c
include/linux/nfs3.h