Lines Matching defs:user_ctx

1320 	struct bpf_flow_keys *user_ctx;
1343 user_ctx = bpf_ctx_init(kattr, sizeof(struct bpf_flow_keys));
1344 if (IS_ERR(user_ctx)) {
1346 return PTR_ERR(user_ctx);
1348 if (user_ctx) {
1349 ret = verify_user_bpf_flow_keys(user_ctx);
1352 flags = user_ctx->flags;
1372 ret = bpf_ctx_finish(kattr, uattr, user_ctx,
1376 kfree(user_ctx);
1388 struct bpf_sk_lookup *user_ctx;
1402 user_ctx = bpf_ctx_init(kattr, sizeof(*user_ctx));
1403 if (IS_ERR(user_ctx))
1404 return PTR_ERR(user_ctx);
1406 if (!user_ctx)
1409 if (user_ctx->sk)
1412 if (!range_is_zero(user_ctx, offsetofend(typeof(*user_ctx), local_port), sizeof(*user_ctx)))
1415 if (user_ctx->local_port > U16_MAX) {
1420 ctx.family = (u16)user_ctx->family;
1421 ctx.protocol = (u16)user_ctx->protocol;
1422 ctx.dport = (u16)user_ctx->local_port;
1423 ctx.sport = user_ctx->remote_port;
1427 ctx.v4.daddr = (__force __be32)user_ctx->local_ip4;
1428 ctx.v4.saddr = (__force __be32)user_ctx->remote_ip4;
1433 ctx.v6.daddr = (struct in6_addr *)user_ctx->local_ip6;
1434 ctx.v6.saddr = (struct in6_addr *)user_ctx->remote_ip6;
1461 user_ctx->cookie = 0;
1468 user_ctx->cookie = sock_gen_cookie(ctx.selected_sk);
1473 ret = bpf_ctx_finish(kattr, uattr, user_ctx, sizeof(*user_ctx));
1477 kfree(user_ctx);
1585 struct nf_hook_state *user_ctx, hook_state = {
1614 user_ctx = bpf_ctx_init(kattr, sizeof(struct nf_hook_state));
1615 if (IS_ERR(user_ctx)) {
1617 return PTR_ERR(user_ctx);
1620 if (user_ctx) {
1621 ret = verify_and_copy_hook_state(&hook_state, user_ctx, dev);
1674 kfree(user_ctx);