Lines Matching refs:sk
70 struct sock *sk; in __cgroup_bpf_run_lsm_sock() local
76 sk = (void *)(unsigned long)args[0]; in __cgroup_bpf_run_lsm_sock()
80 cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in __cgroup_bpf_run_lsm_sock()
102 cgrp = sock_cgroup_ptr(&sock->sk->sk_cgrp_data); in __cgroup_bpf_run_lsm_socket()
1356 int __cgroup_bpf_run_filter_skb(struct sock *sk, in __cgroup_bpf_run_filter_skb() argument
1366 if (!sk || !sk_fullsock(sk)) in __cgroup_bpf_run_filter_skb()
1369 if (sk->sk_family != AF_INET && sk->sk_family != AF_INET6) in __cgroup_bpf_run_filter_skb()
1372 cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in __cgroup_bpf_run_filter_skb()
1373 save_sk = skb->sk; in __cgroup_bpf_run_filter_skb()
1374 skb->sk = sk; in __cgroup_bpf_run_filter_skb()
1418 skb->sk = save_sk; in __cgroup_bpf_run_filter_skb()
1437 int __cgroup_bpf_run_filter_sk(struct sock *sk, in __cgroup_bpf_run_filter_sk() argument
1440 struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in __cgroup_bpf_run_filter_sk()
1442 return bpf_prog_run_array_cg(&cgrp->bpf, atype, sk, bpf_prog_run, 0, in __cgroup_bpf_run_filter_sk()
1462 int __cgroup_bpf_run_filter_sock_addr(struct sock *sk, in __cgroup_bpf_run_filter_sock_addr() argument
1469 .sk = sk, in __cgroup_bpf_run_filter_sock_addr()
1479 if (sk->sk_family != AF_INET && sk->sk_family != AF_INET6) in __cgroup_bpf_run_filter_sock_addr()
1487 cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in __cgroup_bpf_run_filter_sock_addr()
1509 int __cgroup_bpf_run_filter_sock_ops(struct sock *sk, in __cgroup_bpf_run_filter_sock_ops() argument
1513 struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in __cgroup_bpf_run_filter_sock_ops()
1787 int __cgroup_bpf_run_filter_setsockopt(struct sock *sk, int *level, in __cgroup_bpf_run_filter_setsockopt() argument
1791 struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in __cgroup_bpf_run_filter_setsockopt()
1794 .sk = sk, in __cgroup_bpf_run_filter_setsockopt()
1816 lock_sock(sk); in __cgroup_bpf_run_filter_setsockopt()
1819 release_sock(sk); in __cgroup_bpf_run_filter_setsockopt()
1877 int __cgroup_bpf_run_filter_getsockopt(struct sock *sk, int level, in __cgroup_bpf_run_filter_getsockopt() argument
1882 struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in __cgroup_bpf_run_filter_getsockopt()
1885 .sk = sk, in __cgroup_bpf_run_filter_getsockopt()
1925 lock_sock(sk); in __cgroup_bpf_run_filter_getsockopt()
1928 release_sock(sk); in __cgroup_bpf_run_filter_getsockopt()
1960 int __cgroup_bpf_run_filter_getsockopt_kern(struct sock *sk, int level, in __cgroup_bpf_run_filter_getsockopt_kern() argument
1964 struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in __cgroup_bpf_run_filter_getsockopt_kern()
1966 .sk = sk, in __cgroup_bpf_run_filter_getsockopt_kern()
2281 const struct net *net = ctx ? sock_net(ctx->sk) : &init_net; in BPF_CALL_1()
2370 case offsetof(struct bpf_sockopt, sk): in cg_sockopt_is_valid_access()
2411 case offsetof(struct bpf_sockopt, sk): in cg_sockopt_convert_ctx_access()
2412 *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_LDX_MEM, sk); in cg_sockopt_convert_ctx_access()