Lines Matching refs:p
129 simple_get_bytes(const void *p, const void *end, void *res, size_t len) in simple_get_bytes() argument
131 const void *q = (const void *)((const char *)p + len); in simple_get_bytes()
132 if (unlikely(q > end || q < p)) in simple_get_bytes()
134 memcpy(res, p, len); in simple_get_bytes()
139 simple_get_netobj(const void *p, const void *end, struct xdr_netobj *dest) in simple_get_netobj() argument
144 p = simple_get_bytes(p, end, &len, sizeof(len)); in simple_get_netobj()
145 if (IS_ERR(p)) in simple_get_netobj()
146 return p; in simple_get_netobj()
147 q = (const void *)((const char *)p + len); in simple_get_netobj()
148 if (unlikely(q > end || q < p)) in simple_get_netobj()
150 dest->data = kmemdup(p, len, GFP_NOFS); in simple_get_netobj()
187 gss_fill_context(const void *p, const void *end, struct gss_cl_ctx *ctx, struct gss_api_mech *gm) in gss_fill_context() argument
196 p = simple_get_bytes(p, end, &timeout, sizeof(timeout)); in gss_fill_context()
197 if (IS_ERR(p)) in gss_fill_context()
203 p = simple_get_bytes(p, end, &window_size, sizeof(window_size)); in gss_fill_context()
204 if (IS_ERR(p)) in gss_fill_context()
210 p = ERR_PTR(-EACCES); in gss_fill_context()
214 p = simple_get_netobj(p, end, &ctx->gc_wire_ctx); in gss_fill_context()
215 if (IS_ERR(p)) in gss_fill_context()
218 p = simple_get_bytes(p, end, &seclen, sizeof(seclen)); in gss_fill_context()
219 if (IS_ERR(p)) in gss_fill_context()
221 q = (const void *)((const char *)p + seclen); in gss_fill_context()
222 if (unlikely(q > end || q < p)) { in gss_fill_context()
223 p = ERR_PTR(-EFAULT); in gss_fill_context()
226 ret = gss_import_sec_context(p, seclen, gm, &ctx->gc_gss_ctx); in gss_fill_context()
228 p = ERR_PTR(ret); in gss_fill_context()
233 dprintk("RPC: gss_fill_context returning %ld\n", -PTR_ERR(p)); in gss_fill_context()
234 return p; in gss_fill_context()
374 char *p = gss_msg->databuf; in gss_encode_v1_msg() local
380 p += gss_msg->msg.len; in gss_encode_v1_msg()
382 len = sprintf(p, "target=%s ", clnt->cl_principal); in gss_encode_v1_msg()
383 p += len; in gss_encode_v1_msg()
387 len = sprintf(p, "service=* "); in gss_encode_v1_msg()
388 p += len; in gss_encode_v1_msg()
391 len = sprintf(p, "service=nfs "); in gss_encode_v1_msg()
392 p += len; in gss_encode_v1_msg()
395 len = sprintf(p, "\n"); in gss_encode_v1_msg()
602 const void *p, *end; in gss_pipe_downcall() local
622 p = simple_get_bytes(buf, end, &uid, sizeof(uid)); in gss_pipe_downcall()
623 if (IS_ERR(p)) { in gss_pipe_downcall()
624 err = PTR_ERR(p); in gss_pipe_downcall()
644 p = gss_fill_context(p, end, ctx, gss_msg->auth->mech); in gss_pipe_downcall()
645 if (IS_ERR(p)) { in gss_pipe_downcall()
646 err = PTR_ERR(p); in gss_pipe_downcall()
1022 gss_marshal(struct rpc_task *task, __be32 *p) in gss_marshal() argument
1037 *p++ = htonl(RPC_AUTH_GSS); in gss_marshal()
1038 cred_len = p++; in gss_marshal()
1044 *p++ = htonl((u32) RPC_GSS_VERSION); in gss_marshal()
1045 *p++ = htonl((u32) ctx->gc_proc); in gss_marshal()
1046 *p++ = htonl((u32) req->rq_seqno); in gss_marshal()
1047 *p++ = htonl((u32) gss_cred->gc_service); in gss_marshal()
1048 p = xdr_encode_netobj(p, &ctx->gc_wire_ctx); in gss_marshal()
1049 *cred_len = htonl((p - (cred_len + 1)) << 2); in gss_marshal()
1055 iov.iov_len = (u8 *)p - (u8 *)iov.iov_base; in gss_marshal()
1059 *p++ = htonl(RPC_AUTH_GSS); in gss_marshal()
1061 mic.data = (u8 *)(p + 1); in gss_marshal()
1069 p = xdr_encode_opaque(p, NULL, mic.len); in gss_marshal()
1071 return p; in gss_marshal()
1129 gss_validate(struct rpc_task *task, __be32 *p) in gss_validate() argument
1142 flav = ntohl(*p++); in gss_validate()
1143 if ((len = ntohl(*p++)) > RPC_MAX_AUTH_SIZE) in gss_validate()
1151 mic.data = (u8 *)p; in gss_validate()
1168 return p + XDR_QUADLEN(len); in gss_validate()
1177 kxdrproc_t encode, struct rpc_rqst *rqstp, __be32 *p, void *obj) in gss_wrap_req_integ() argument
1189 integ_len = p++; in gss_wrap_req_integ()
1190 offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base; in gss_wrap_req_integ()
1191 *p++ = htonl(rqstp->rq_seqno); in gss_wrap_req_integ()
1193 status = encode(rqstp, p, obj); in gss_wrap_req_integ()
1207 p = iov->iov_base + iov->iov_len; in gss_wrap_req_integ()
1208 mic.data = (u8 *)(p + 1); in gss_wrap_req_integ()
1216 q = xdr_encode_opaque(p, NULL, mic.len); in gss_wrap_req_integ()
1218 offset = (u8 *)q - (u8 *)p; in gss_wrap_req_integ()
1270 kxdrproc_t encode, struct rpc_rqst *rqstp, __be32 *p, void *obj) in gss_wrap_req_priv() argument
1283 opaque_len = p++; in gss_wrap_req_priv()
1284 offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base; in gss_wrap_req_priv()
1285 *p++ = htonl(rqstp->rq_seqno); in gss_wrap_req_priv()
1287 status = encode(rqstp, p, obj); in gss_wrap_req_priv()
1322 p = iov->iov_base + iov->iov_len; in gss_wrap_req_priv()
1324 memset(p, 0, pad); in gss_wrap_req_priv()
1333 kxdrproc_t encode, void *rqstp, __be32 *p, void *obj) in gss_wrap_req() argument
1346 status = encode(rqstp, p, obj); in gss_wrap_req()
1351 status = encode(rqstp, p, obj); in gss_wrap_req()
1355 rqstp, p, obj); in gss_wrap_req()
1359 rqstp, p, obj); in gss_wrap_req()
1370 struct rpc_rqst *rqstp, __be32 **p) in gss_unwrap_resp_integ() argument
1380 integ_len = ntohl(*(*p)++); in gss_unwrap_resp_integ()
1383 data_offset = (u8 *)(*p) - (u8 *)rcv_buf->head[0].iov_base; in gss_unwrap_resp_integ()
1387 if (ntohl(*(*p)++) != rqstp->rq_seqno) in gss_unwrap_resp_integ()
1407 struct rpc_rqst *rqstp, __be32 **p) in gss_unwrap_resp_priv() argument
1415 opaque_len = ntohl(*(*p)++); in gss_unwrap_resp_priv()
1416 offset = (u8 *)(*p) - (u8 *)rcv_buf->head[0].iov_base; in gss_unwrap_resp_priv()
1427 if (ntohl(*(*p)++) != rqstp->rq_seqno) in gss_unwrap_resp_priv()
1436 kxdrproc_t decode, void *rqstp, __be32 *p, void *obj) in gss_unwrap_resp() argument
1442 __be32 *savedp = p; in gss_unwrap_resp()
1453 status = gss_unwrap_resp_integ(cred, ctx, rqstp, &p); in gss_unwrap_resp()
1458 status = gss_unwrap_resp_priv(cred, ctx, rqstp, &p); in gss_unwrap_resp()
1464 cred->cr_auth->au_rslack = cred->cr_auth->au_verfsize + (p - savedp) in gss_unwrap_resp()
1467 status = decode(rqstp, p, obj); in gss_unwrap_resp()