Searched refs:sec_ctx (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/net/key/
H A Daf_key.c413 static inline int pfkey_sec_ctx_len(const struct sadb_x_sec_ctx *sec_ctx) pfkey_sec_ctx_len() argument
416 sec_ctx->sadb_x_ctx_len, pfkey_sec_ctx_len()
422 const struct sadb_x_sec_ctx *sec_ctx = p; verify_sec_ctx_len() local
423 int len = sec_ctx->sadb_x_ctx_len; verify_sec_ctx_len()
428 len = pfkey_sec_ctx_len(sec_ctx); verify_sec_ctx_len()
430 if (sec_ctx->sadb_x_sec_len != len) verify_sec_ctx_len()
436 static inline struct xfrm_user_sec_ctx *pfkey_sadb2xfrm_user_sec_ctx(const struct sadb_x_sec_ctx *sec_ctx, pfkey_sadb2xfrm_user_sec_ctx() argument
440 int ctx_size = sec_ctx->sadb_x_ctx_len; pfkey_sadb2xfrm_user_sec_ctx()
447 uctx->len = pfkey_sec_ctx_len(sec_ctx); pfkey_sadb2xfrm_user_sec_ctx()
448 uctx->exttype = sec_ctx->sadb_x_sec_exttype; pfkey_sadb2xfrm_user_sec_ctx()
449 uctx->ctx_doi = sec_ctx->sadb_x_ctx_doi; pfkey_sadb2xfrm_user_sec_ctx()
450 uctx->ctx_alg = sec_ctx->sadb_x_ctx_alg; pfkey_sadb2xfrm_user_sec_ctx()
451 uctx->ctx_len = sec_ctx->sadb_x_ctx_len; pfkey_sadb2xfrm_user_sec_ctx()
452 memcpy(uctx + 1, sec_ctx + 1, pfkey_sadb2xfrm_user_sec_ctx()
731 struct sadb_x_sec_ctx *sec_ctx; __pfkey_xfrm_state2msg() local
998 sec_ctx = (struct sadb_x_sec_ctx *) skb_put(skb, __pfkey_xfrm_state2msg()
1000 sec_ctx->sadb_x_sec_len = __pfkey_xfrm_state2msg()
1002 sec_ctx->sadb_x_sec_exttype = SADB_X_EXT_SEC_CTX; __pfkey_xfrm_state2msg()
1003 sec_ctx->sadb_x_ctx_doi = xfrm_ctx->ctx_doi; __pfkey_xfrm_state2msg()
1004 sec_ctx->sadb_x_ctx_alg = xfrm_ctx->ctx_alg; __pfkey_xfrm_state2msg()
1005 sec_ctx->sadb_x_ctx_len = xfrm_ctx->ctx_len; __pfkey_xfrm_state2msg()
1006 memcpy(sec_ctx + 1, xfrm_ctx->ctx_str, __pfkey_xfrm_state2msg()
1037 const struct sadb_x_sec_ctx *sec_ctx; pfkey_msg2xfrm_state() local
1124 sec_ctx = ext_hdrs[SADB_X_EXT_SEC_CTX - 1]; pfkey_msg2xfrm_state()
1125 if (sec_ctx != NULL) { pfkey_msg2xfrm_state()
1126 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); pfkey_msg2xfrm_state()
2011 struct sadb_x_sec_ctx *sec_ctx; pfkey_xfrm_policy2msg() local
2144 sec_ctx = (struct sadb_x_sec_ctx *) skb_put(skb, ctx_size); pfkey_xfrm_policy2msg()
2145 sec_ctx->sadb_x_sec_len = ctx_size / sizeof(uint64_t); pfkey_xfrm_policy2msg()
2146 sec_ctx->sadb_x_sec_exttype = SADB_X_EXT_SEC_CTX; pfkey_xfrm_policy2msg()
2147 sec_ctx->sadb_x_ctx_doi = xfrm_ctx->ctx_doi; pfkey_xfrm_policy2msg()
2148 sec_ctx->sadb_x_ctx_alg = xfrm_ctx->ctx_alg; pfkey_xfrm_policy2msg()
2149 sec_ctx->sadb_x_ctx_len = xfrm_ctx->ctx_len; pfkey_xfrm_policy2msg()
2150 memcpy(sec_ctx + 1, xfrm_ctx->ctx_str, pfkey_xfrm_policy2msg()
2198 struct sadb_x_sec_ctx *sec_ctx; pfkey_spdadd() local
2241 sec_ctx = ext_hdrs[SADB_X_EXT_SEC_CTX - 1]; pfkey_spdadd()
2242 if (sec_ctx != NULL) { pfkey_spdadd()
2243 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); pfkey_spdadd()
2313 struct sadb_x_sec_ctx *sec_ctx; pfkey_spddelete() local
2343 sec_ctx = ext_hdrs[SADB_X_EXT_SEC_CTX - 1]; pfkey_spddelete()
2344 if (sec_ctx != NULL) { pfkey_spddelete()
2345 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); pfkey_spddelete()
3087 struct sadb_x_sec_ctx *sec_ctx; pfkey_send_acquire() local
3173 sec_ctx = (struct sadb_x_sec_ctx *) skb_put(skb, pfkey_send_acquire()
3175 sec_ctx->sadb_x_sec_len = pfkey_send_acquire()
3177 sec_ctx->sadb_x_sec_exttype = SADB_X_EXT_SEC_CTX; pfkey_send_acquire()
3178 sec_ctx->sadb_x_ctx_doi = xfrm_ctx->ctx_doi; pfkey_send_acquire()
3179 sec_ctx->sadb_x_ctx_alg = xfrm_ctx->ctx_alg; pfkey_send_acquire()
3180 sec_ctx->sadb_x_ctx_len = xfrm_ctx->ctx_len; pfkey_send_acquire()
3181 memcpy(sec_ctx + 1, xfrm_ctx->ctx_str, pfkey_send_acquire()
3194 struct sadb_x_sec_ctx *sec_ctx; pfkey_compile_policy() local
3251 sec_ctx = (struct sadb_x_sec_ctx *)p; pfkey_compile_policy()
3253 sec_ctx->sadb_x_sec_len) { pfkey_compile_policy()
3259 uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_ATOMIC); pfkey_compile_policy()
/linux-4.4.14/security/
H A Dsecurity.c1396 struct xfrm_user_sec_ctx *sec_ctx, security_xfrm_policy_alloc()
1399 return call_int_hook(xfrm_policy_alloc_security, 0, ctxp, sec_ctx, gfp); security_xfrm_policy_alloc()
1421 struct xfrm_user_sec_ctx *sec_ctx) security_xfrm_state_alloc()
1423 return call_int_hook(xfrm_state_alloc, 0, x, sec_ctx); security_xfrm_state_alloc()
1395 security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx, gfp_t gfp) security_xfrm_policy_alloc() argument
1420 security_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx) security_xfrm_state_alloc() argument
/linux-4.4.14/include/linux/
H A Dsecurity.h1351 struct xfrm_user_sec_ctx *sec_ctx, gfp_t gfp);
1355 int security_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx);
1370 struct xfrm_user_sec_ctx *sec_ctx, security_xfrm_policy_alloc()
1391 struct xfrm_user_sec_ctx *sec_ctx) security_xfrm_state_alloc()
1369 security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx, gfp_t gfp) security_xfrm_policy_alloc() argument
1390 security_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx) security_xfrm_state_alloc() argument
H A Dlsm_hooks.h885 * @sec_ctx contains the security context information being provided by
906 * @sec_ctx contains the security context information being provided by
910 * context to correspond to sec_ctx. Return 0 if operation was successful
1577 struct xfrm_user_sec_ctx *sec_ctx,
1584 struct xfrm_user_sec_ctx *sec_ctx);

Completed in 472 milliseconds