Home
last modified time | relevance | path

Searched refs:unix_sk (Results 1 – 11 of 11) sorted by relevance

/linux/tools/testing/selftests/bpf/progs/
H A Dbpf_iter_setsockopt_unix.c16 static inline int cmpname(struct unix_sock *unix_sk) in cmpname() argument
21 if (unix_sk->addr->name->sun_path[i] != sun_path[i]) in cmpname()
31 struct unix_sock *unix_sk = ctx->unix_sk; in change_sndbuf() local
34 if (!unix_sk || !unix_sk->addr) in change_sndbuf()
37 if (unix_sk->addr->name->sun_path[0]) in change_sndbuf()
40 if (cmpname(unix_sk)) in change_sndbuf()
44 err = bpf_setsockopt(unix_sk, SOL_SOCKET, SO_SNDBUF, in change_sndbuf()
50 err = bpf_getsockopt(unix_sk, SOL_SOCKE in change_sndbuf()
[all...]
H A Dbpf_iter_unix.c27 struct unix_sock *unix_sk = ctx->unix_sk; in dump_unix() local
28 struct sock *sk = (struct sock *)unix_sk; in dump_unix()
32 if (!unix_sk) in dump_unix()
41 unix_sk, in dump_unix()
51 if (unix_sk->addr) { in dump_unix()
52 if (unix_sk->addr->name->sun_path[0]) { in dump_unix()
53 BPF_SEQ_PRINTF(seq, " %s", unix_sk->addr->name->sun_path); in dump_unix()
61 len = unix_sk->addr->len - sizeof(short); in dump_unix()
71 unix_sk in dump_unix()
[all...]
H A Dtest_skc_to_unix_sock.c16 struct unix_sock *unix_sk; in BPF_PROG() local
22 unix_sk = (struct unix_sock *)bpf_skc_to_unix_sock(sock->sk); in BPF_PROG()
23 if (!unix_sk) in BPF_PROG()
26 if (unix_sk->addr->name->sun_path[0]) in BPF_PROG()
29 len = unix_sk->addr->len - sizeof(short); in BPF_PROG()
35 path[i] = unix_sk->addr->name->sun_path[i]; in BPF_PROG()
/linux/security/apparmor/
H A Daf_unix.c242 &unix_sk(sk)->path); in profile_sk_perm()
244 state = match_to_sk(rules->policy, state, request, unix_sk(sk), in profile_sk_perm()
304 &unix_sk(sk)->path); in profile_listen_perm()
307 unix_sk(sk), CMD_LISTEN, &p, &ad->info); in profile_listen_perm()
339 &unix_sk(sk)->path); in profile_accept_perm()
342 unix_sk(sk), &p, &ad->info); in profile_accept_perm()
370 &unix_sk(sk)->path); in profile_opt_perm()
372 state = match_to_cmd(rules->policy, state, request, unix_sk(sk), in profile_opt_perm()
416 unix_sk(sk), in profile_peer_perm()
470 is_unix_fs(sock->sk) ? &unix_sk(soc in aa_unix_sock_perm()
[all...]
/linux/net/unix/
H A Daf_unix.c188 if (a->sk_state == TCP_LISTEN && unix_sk(b)->listener == a) in unix_recvq_lock_cmp_fn()
192 if (b->sk_state == TCP_LISTEN && unix_sk(a)->listener == b) in unix_recvq_lock_cmp_fn()
387 smp_store_release(&unix_sk(sk)->addr, addr); in __unix_set_addr_hash()
432 struct unix_sock *u = unix_sk(s); in __unix_find_socket_byname()
462 struct dentry *dentry = unix_sk(s)->path.dentry; in unix_find_socket_byinode()
507 __remove_wait_queue(&unix_sk(u->peer_wake.private)->peer_wait, in unix_dgram_peer_wake_relay()
524 u = unix_sk(sk); in unix_dgram_peer_wake_connect()
525 u_other = unix_sk(other); in unix_dgram_peer_wake_connect()
545 u = unix_sk(sk); in unix_dgram_peer_wake_disconnect()
546 u_other = unix_sk(othe in unix_dgram_peer_wake_disconnect()
3641 unix_prog_seq_show(struct bpf_prog * prog,struct bpf_iter_meta * meta,struct unix_sock * unix_sk,uid_t uid) unix_prog_seq_show() argument
3889 DEFINE_BPF_ITER_FUNC(unix,struct bpf_iter_meta * meta,struct unix_sock * unix_sk,uid_t uid) DEFINE_BPF_ITER_FUNC() argument
[all...]
H A Dunix_bpf.c20 struct unix_sock *u = unix_sk(sk); in unix_msg_wait_data()
54 struct unix_sock *u = unix_sk(sk); in unix_bpf_recvmsg()
H A Dgarbage.c107 return unix_sk(sk); in unix_get_socket()
119 return unix_sk(edge->successor->listener)->vertex; in unix_edge_successor()
273 unix_update_graph(unix_sk(receiver->listener)->vertex); in unix_update_edges()
H A Ddiag.c19 struct unix_address *addr = smp_load_acquire(&unix_sk(sk)->addr); in sk_diag_dump_name()
31 struct dentry *dentry = unix_sk(sk)->path.dentry; in sk_diag_dump_vfs()
/linux/security/apparmor/include/
H A Daf_unix.h22 #define unix_peer(sk) (unix_sk(sk)->peer)
28 #define is_unix_anonymous(U) (!unix_sk(U)->addr)
30 unix_sk(U)->addr->name->sun_path[0])
/linux/security/landlock/
H A Dtask.c241 lockdep_assert_held(&unix_sk(other)->lock); in sock_is_scoped()
249 struct unix_address *addr = unix_sk(sock)->addr; in is_abstract_socket()
/linux/security/
H A Dlsm_audit.c319 u = unix_sk(sk); in audit_log_lsm_data()