17 Dec, 2010

3 commits

  • Now that all client-side XDR decoder routines use xdr_streams, there
    should be no need to support the legacy calling sequence [rpc_rqst *,
    __be32 *, RPC res *] anywhere. We can construct an xdr_stream in the
    generic RPC code, instead of in each decoder function.

    This is a refactoring change. It should not cause different behavior.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Now that all client-side XDR encoder routines use xdr_streams, there
    should be no need to support the legacy calling sequence [rpc_rqst *,
    __be32 *, RPC arg *] anywhere. We can construct an xdr_stream in the
    generic RPC code, instead of in each encoder function.

    Also, all the client-side encoder functions return 0 now, making a
    return value superfluous. Take this opportunity to convert them to
    return void instead.

    This is a refactoring change. It should not cause different behavior.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • 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 want to be able to pass xdr_streams from
    call_encode() to all XDR encoding functions, rather than building
    an xdr_stream in every XDR encoding function in the kernel.

    Same idea as the NLM v3 XDR overhaul.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever