Home
last modified time | relevance | path

Searched refs:peer_sk (Results 1 – 4 of 4) sorted by relevance

/linux/tools/testing/selftests/bpf/progs/
H A Dcgroup_skb_sk_lookup_kern.c46 struct bpf_sock *peer_sk; in is_allowed_peer_cg() local
50 peer_sk = bpf_sk_lookup_tcp(skb, &tuple, tuple_len, in is_allowed_peer_cg()
52 if (!peer_sk) in is_allowed_peer_cg()
56 peer_cgid = bpf_sk_cgroup_id(peer_sk); in is_allowed_peer_cg()
59 peer_acgid = bpf_sk_ancestor_cgroup_id(peer_sk, 2); in is_allowed_peer_cg()
61 bpf_sk_release(peer_sk); in is_allowed_peer_cg()
/linux/security/apparmor/
H A Daf_unix.c625 struct sock *sk, struct sock *peer_sk, in aa_unix_peer_perm() argument
628 struct unix_sock *peeru = unix_sk(peer_sk); in aa_unix_peer_perm()
631 struct sockaddr_un *paddr = aa_sunaddr(unix_sk(peer_sk), &plen); in aa_unix_peer_perm()
635 AA_BUG(!peer_sk); in aa_unix_peer_perm()
641 is_unix_fs(peer_sk) ? &peeru->path : NULL, in aa_unix_peer_perm()
716 struct sock *peer_sk = NULL; in aa_unix_file_perm() local
732 peer_sk = unix_peer(sock->sk); in aa_unix_file_perm()
733 if (peer_sk) in aa_unix_file_perm()
734 sock_hold(peer_sk); in aa_unix_file_perm()
741 if (is_sk_fs && peer_sk) in aa_unix_file_perm()
[all …]
H A Dlsm.c1124 struct sock *sk, struct sock *peer_sk) in unix_connect_perm() argument
1126 struct aa_sk_ctx *peer_ctx = aa_sock(peer_sk); in unix_connect_perm()
1131 sk, peer_sk, in unix_connect_perm()
1133 lockdep_is_held(&unix_sk(peer_sk)->lock))); in unix_connect_perm()
1134 if (!is_unix_fs(peer_sk)) { in unix_connect_perm()
1138 lockdep_is_held(&unix_sk(peer_sk)->lock)), in unix_connect_perm()
1141 peer_sk, sk, label)); in unix_connect_perm()
1185 static int apparmor_unix_stream_connect(struct sock *sk, struct sock *peer_sk, in apparmor_unix_stream_connect() argument
1189 struct aa_sk_ctx *peer_ctx = aa_sock(peer_sk); in apparmor_unix_stream_connect()
1196 error = unix_connect_perm(current_cred(), label, sk, peer_sk); in apparmor_unix_stream_connect()
/linux/security/apparmor/include/
H A Daf_unix.h37 struct sock *sk, struct sock *peer_sk,