History

SUNRPC: Use struct xdr_stream when decoding RPC Reply header

Modernize and harden the code path that parses an RPC Reply message.

Chuck Lever committed 7 years ago

Commit a0584ee1 parent 7f5667a7 files · +243 −201Browse files

Showing the changes to include/linux (2 of 7 files). Show all

Unified · Split

2 files
  1. include/linux/sunrpc/auth.h +10 −5
  2. include/linux/sunrpc/xdr.h +1 −0
include/linux/sunrpc/auth.h+10−5
@@ -134,11 +134,12 @@ struct rpc_credops { · 133 unmodified lines
134134 int (*crmarshal)(struct rpc_task *task,
135135 struct xdr_stream *xdr);
136136 int (*crrefresh)(struct rpc_task *);
137− __be32 * (*crvalidate)(struct rpc_task *, __be32 *);
137+ int (*crvalidate)(struct rpc_task *task,
138+ struct xdr_stream *xdr);
138139 int (*crwrap_req)(struct rpc_task *task,
139140 struct xdr_stream *xdr);
140− int (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t,
141− void *, __be32 *, void *);
141+ int (*crunwrap_resp)(struct rpc_task *task,
142+ struct xdr_stream *xdr);
142143 int (*crkey_timeout)(struct rpc_cred *);
143144 char * (*crstringify_acceptor)(struct rpc_cred *);
144145 bool (*crneed_reencode)(struct rpc_task *);
@@ -168,12 +169,16 @@ struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); · 23 unmodified lines
168169 void put_rpccred(struct rpc_cred *);
169170 int rpcauth_marshcred(struct rpc_task *task,
170171 struct xdr_stream *xdr);
171−__be32 * rpcauth_checkverf(struct rpc_task *, __be32 *);
172+int rpcauth_checkverf(struct rpc_task *task,
173+ struct xdr_stream *xdr);
172174 int rpcauth_wrap_req_encode(struct rpc_task *task,
173175 struct xdr_stream *xdr);
174176 int rpcauth_wrap_req(struct rpc_task *task,
175177 struct xdr_stream *xdr);
176−int rpcauth_unwrap_resp(struct rpc_task *task, kxdrdproc_t decode, void *rqstp, __be32 *data, void *obj);
178+int rpcauth_unwrap_resp_decode(struct rpc_task *task,
179+ struct xdr_stream *xdr);
180+int rpcauth_unwrap_resp(struct rpc_task *task,
181+ struct xdr_stream *xdr);
177182 bool rpcauth_xmit_need_reencode(struct rpc_task *task);
178183 int rpcauth_refreshcred(struct rpc_task *);
179184 void rpcauth_invalcred(struct rpc_task *);
include/linux/sunrpc/xdr.h+1−0
@@ -89,6 +89,7 @@ xdr_buf_init(struct xdr_buf *buf, void *start, size_t len) · 88 unmodified lines
8989
9090 #define rpc_auth_null cpu_to_be32(RPC_AUTH_NULL)
9191 #define rpc_auth_unix cpu_to_be32(RPC_AUTH_UNIX)
92+#define rpc_auth_short cpu_to_be32(RPC_AUTH_SHORT)
9293 #define rpc_auth_gss cpu_to_be32(RPC_AUTH_GSS)
9394
9495 #define rpc_call cpu_to_be32(RPC_CALL)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t