• Home
  • Raw
  • Download

Lines Matching refs:p

191 simple_get_bytes(const void *p, const void *end, void *res, int len)  in simple_get_bytes()  argument
193 const void *q = (const void *)((const char *)p + len); in simple_get_bytes()
194 if (unlikely(q > end || q < p)) in simple_get_bytes()
196 memcpy(res, p, len); in simple_get_bytes()
201 simple_get_netobj(const void *p, const void *end, struct xdr_netobj *res) in simple_get_netobj() argument
206 p = simple_get_bytes(p, end, &len, sizeof(len)); in simple_get_netobj()
207 if (IS_ERR(p)) in simple_get_netobj()
208 return p; in simple_get_netobj()
209 q = (const void *)((const char *)p + len); in simple_get_netobj()
210 if (unlikely(q > end || q < p)) in simple_get_netobj()
212 res->data = kmemdup(p, len, GFP_NOFS); in simple_get_netobj()
220 get_key(const void *p, const void *end, in get_key() argument
226 p = simple_get_bytes(p, end, &alg, sizeof(alg)); in get_key()
227 if (IS_ERR(p)) in get_key()
242 p = ERR_PTR(-EINVAL); in get_key()
245 p = simple_get_netobj(p, end, &key); in get_key()
246 if (IS_ERR(p)) in get_key()
264 return p; in get_key()
270 p = ERR_PTR(-EINVAL); in get_key()
272 return p; in get_key()
276 gss_import_v1_context(const void *p, const void *end, struct krb5_ctx *ctx) in gss_import_v1_context() argument
280 p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate)); in gss_import_v1_context()
281 if (IS_ERR(p)) in gss_import_v1_context()
289 p = ERR_PTR(-EINVAL); in gss_import_v1_context()
297 if (unlikely(p + 20 > end || p + 20 < p)) { in gss_import_v1_context()
298 p = ERR_PTR(-EFAULT); in gss_import_v1_context()
301 p += 20; in gss_import_v1_context()
302 p = simple_get_bytes(p, end, &tmp, sizeof(tmp)); in gss_import_v1_context()
303 if (IS_ERR(p)) in gss_import_v1_context()
306 p = ERR_PTR(-ENOSYS); in gss_import_v1_context()
309 p = simple_get_bytes(p, end, &tmp, sizeof(tmp)); in gss_import_v1_context()
310 if (IS_ERR(p)) in gss_import_v1_context()
313 p = ERR_PTR(-ENOSYS); in gss_import_v1_context()
316 p = simple_get_bytes(p, end, &ctx->endtime, sizeof(ctx->endtime)); in gss_import_v1_context()
317 if (IS_ERR(p)) in gss_import_v1_context()
319 p = simple_get_bytes(p, end, &ctx->seq_send, sizeof(ctx->seq_send)); in gss_import_v1_context()
320 if (IS_ERR(p)) in gss_import_v1_context()
322 p = simple_get_netobj(p, end, &ctx->mech_used); in gss_import_v1_context()
323 if (IS_ERR(p)) in gss_import_v1_context()
325 p = get_key(p, end, ctx, &ctx->enc); in gss_import_v1_context()
326 if (IS_ERR(p)) in gss_import_v1_context()
328 p = get_key(p, end, ctx, &ctx->seq); in gss_import_v1_context()
329 if (IS_ERR(p)) in gss_import_v1_context()
331 if (p != end) { in gss_import_v1_context()
332 p = ERR_PTR(-EFAULT); in gss_import_v1_context()
345 return PTR_ERR(p); in gss_import_v1_context()
610 gss_import_v2_context(const void *p, const void *end, struct krb5_ctx *ctx, in gss_import_v2_context() argument
615 p = simple_get_bytes(p, end, &ctx->flags, sizeof(ctx->flags)); in gss_import_v2_context()
616 if (IS_ERR(p)) in gss_import_v2_context()
620 p = simple_get_bytes(p, end, &ctx->endtime, sizeof(ctx->endtime)); in gss_import_v2_context()
621 if (IS_ERR(p)) in gss_import_v2_context()
623 p = simple_get_bytes(p, end, &ctx->seq_send64, sizeof(ctx->seq_send64)); in gss_import_v2_context()
624 if (IS_ERR(p)) in gss_import_v2_context()
631 p = ERR_PTR(-EINVAL); in gss_import_v2_context()
634 p = simple_get_bytes(p, end, &ctx->enctype, sizeof(ctx->enctype)); in gss_import_v2_context()
635 if (IS_ERR(p)) in gss_import_v2_context()
644 p = ERR_PTR(-EINVAL); in gss_import_v2_context()
649 p = simple_get_bytes(p, end, ctx->Ksess, keylen); in gss_import_v2_context()
650 if (IS_ERR(p)) in gss_import_v2_context()
653 if (p != end) { in gss_import_v2_context()
654 p = ERR_PTR(-EINVAL); in gss_import_v2_context()
661 p = ERR_PTR(-ENOMEM); in gss_import_v2_context()
679 return PTR_ERR(p); in gss_import_v2_context()
683 gss_import_sec_context_kerberos(const void *p, size_t len, in gss_import_sec_context_kerberos() argument
688 const void *end = (const void *)((const char *)p + len); in gss_import_sec_context_kerberos()
697 ret = gss_import_v1_context(p, end, ctx); in gss_import_sec_context_kerberos()
699 ret = gss_import_v2_context(p, end, ctx, gfp_mask); in gss_import_sec_context_kerberos()