Modernize and harden the code path that parses an RPC Reply message.
Showing the changes to include/linux (2 of 7 files). Show all
Unified · Split
| @@ -134,11 +134,12 @@ struct rpc_credops { · 133 unmodified lines | |||
| 134 | int (*crmarshal)(struct rpc_task *task, | 134 | int (*crmarshal)(struct rpc_task *task, |
| 135 | struct xdr_stream *xdr); | 135 | struct xdr_stream *xdr); |
| 136 | int (*crrefresh)(struct rpc_task *); | 136 | int (*crrefresh)(struct rpc_task *); |
| 137 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); | 137 | int (*crvalidate)(struct rpc_task *task, |
| 138 | struct xdr_stream *xdr); | ||
| 138 | int (*crwrap_req)(struct rpc_task *task, | 139 | int (*crwrap_req)(struct rpc_task *task, |
| 139 | struct xdr_stream *xdr); | 140 | struct xdr_stream *xdr); |
| 140 | int (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t, | 141 | int (*crunwrap_resp)(struct rpc_task *task, |
| 141 | void *, __be32 *, void *); | 142 | struct xdr_stream *xdr); |
| 142 | int (*crkey_timeout)(struct rpc_cred *); | 143 | int (*crkey_timeout)(struct rpc_cred *); |
| 143 | char * (*crstringify_acceptor)(struct rpc_cred *); | 144 | char * (*crstringify_acceptor)(struct rpc_cred *); |
| 144 | bool (*crneed_reencode)(struct rpc_task *); | 145 | bool (*crneed_reencode)(struct rpc_task *); |
| @@ -168,12 +169,16 @@ struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); · 23 unmodified lines | |||
| 168 | void put_rpccred(struct rpc_cred *); | 169 | void put_rpccred(struct rpc_cred *); |
| 169 | int rpcauth_marshcred(struct rpc_task *task, | 170 | int rpcauth_marshcred(struct rpc_task *task, |
| 170 | struct xdr_stream *xdr); | 171 | 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); | ||
| 172 | int rpcauth_wrap_req_encode(struct rpc_task *task, | 174 | int rpcauth_wrap_req_encode(struct rpc_task *task, |
| 173 | struct xdr_stream *xdr); | 175 | struct xdr_stream *xdr); |
| 174 | int rpcauth_wrap_req(struct rpc_task *task, | 176 | int rpcauth_wrap_req(struct rpc_task *task, |
| 175 | struct xdr_stream *xdr); | 177 | 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); | ||
| 177 | bool rpcauth_xmit_need_reencode(struct rpc_task *task); | 182 | bool rpcauth_xmit_need_reencode(struct rpc_task *task); |
| 178 | int rpcauth_refreshcred(struct rpc_task *); | 183 | int rpcauth_refreshcred(struct rpc_task *); |
| 179 | void rpcauth_invalcred(struct rpc_task *); | 184 | void rpcauth_invalcred(struct rpc_task *); |
| @@ -89,6 +89,7 @@ xdr_buf_init(struct xdr_buf *buf, void *start, size_t len) · 88 unmodified lines | |||
| 89 | 89 | ||
| 90 | #define rpc_auth_null cpu_to_be32(RPC_AUTH_NULL) | 90 | #define rpc_auth_null cpu_to_be32(RPC_AUTH_NULL) |
| 91 | #define rpc_auth_unix cpu_to_be32(RPC_AUTH_UNIX) | 91 | #define rpc_auth_unix cpu_to_be32(RPC_AUTH_UNIX) |
| 92 | #define rpc_auth_short cpu_to_be32(RPC_AUTH_SHORT) | ||
| 92 | #define rpc_auth_gss cpu_to_be32(RPC_AUTH_GSS) | 93 | #define rpc_auth_gss cpu_to_be32(RPC_AUTH_GSS) |
| 93 | 94 | ||
| 94 | #define rpc_call cpu_to_be32(RPC_CALL) | 95 | #define rpc_call cpu_to_be32(RPC_CALL) |