Lines Matching defs:user_ctx

1375 	struct bpf_flow_keys *user_ctx;
1398 user_ctx = bpf_ctx_init(kattr, sizeof(struct bpf_flow_keys));
1399 if (IS_ERR(user_ctx)) {
1401 return PTR_ERR(user_ctx);
1403 if (user_ctx) {
1404 ret = verify_user_bpf_flow_keys(user_ctx);
1407 flags = user_ctx->flags;
1427 ret = bpf_ctx_finish(kattr, uattr, user_ctx,
1431 kfree(user_ctx);
1443 struct bpf_sk_lookup *user_ctx;
1457 user_ctx = bpf_ctx_init(kattr, sizeof(*user_ctx));
1458 if (IS_ERR(user_ctx))
1459 return PTR_ERR(user_ctx);
1461 if (!user_ctx)
1464 if (user_ctx->sk)
1467 if (!range_is_zero(user_ctx, offsetofend(typeof(*user_ctx), local_port), sizeof(*user_ctx)))
1470 if (user_ctx->local_port > U16_MAX) {
1475 ctx.family = (u16)user_ctx->family;
1476 ctx.protocol = (u16)user_ctx->protocol;
1477 ctx.dport = (u16)user_ctx->local_port;
1478 ctx.sport = user_ctx->remote_port;
1482 ctx.v4.daddr = (__force __be32)user_ctx->local_ip4;
1483 ctx.v4.saddr = (__force __be32)user_ctx->remote_ip4;
1488 ctx.v6.daddr = (struct in6_addr *)user_ctx->local_ip6;
1489 ctx.v6.saddr = (struct in6_addr *)user_ctx->remote_ip6;
1516 user_ctx->cookie = 0;
1523 user_ctx->cookie = sock_gen_cookie(ctx.selected_sk);
1528 ret = bpf_ctx_finish(kattr, uattr, user_ctx, sizeof(*user_ctx));
1532 kfree(user_ctx);
1640 struct nf_hook_state *user_ctx, hook_state = {
1669 user_ctx = bpf_ctx_init(kattr, sizeof(struct nf_hook_state));
1670 if (IS_ERR(user_ctx)) {
1672 return PTR_ERR(user_ctx);
1675 if (user_ctx) {
1676 ret = verify_and_copy_hook_state(&hook_state, user_ctx, dev);
1729 kfree(user_ctx);