Lines Matching +full:local +full:- +full:pid
1 // SPDX-License-Identifier: GPL-2.0
17 int inode_storage_result = -1;
18 int sk_storage_result = -1;
19 int task_storage_result = -1;
64 __u32 pid = bpf_get_current_pid_tgid() >> 32; in BPF_PROG() local
70 if (pid != monitored_pid) in BPF_PROG()
77 task_storage_result = -1; in BPF_PROG()
84 is_self_unlink = storage->exec_inode == victim->d_inode; in BPF_PROG()
88 if (!storage || storage->value) in BPF_PROG()
98 local_storage = task->bpf_storage; in BPF_PROG()
99 if (!local_storage || local_storage->smap) in BPF_PROG()
104 return is_self_unlink ? -EPERM : 0; in BPF_PROG()
115 /* new_dentry->d_inode can be NULL when the inode is renamed to a file in BPF_PROG()
119 bpf_inode_storage_get(&inode_storage_map, new_dentry->d_inode, 0, in BPF_PROG()
122 storage = bpf_inode_storage_get(&inode_storage_map, old_dentry->d_inode, in BPF_PROG()
127 if (storage->value != DUMMY_STORAGE_VALUE) in BPF_PROG()
128 inode_storage_result = -1; in BPF_PROG()
130 err = bpf_inode_storage_delete(&inode_storage_map, old_dentry->d_inode); in BPF_PROG()
141 __u32 pid = bpf_get_current_pid_tgid() >> 32; in BPF_PROG() local
143 struct sock *sk = sock->sk; in BPF_PROG()
145 if (pid != monitored_pid || !sk) in BPF_PROG()
152 sk_storage_result = -1; in BPF_PROG()
153 if (storage->value != DUMMY_STORAGE_VALUE) in BPF_PROG()
157 * with the local storage. in BPF_PROG()
176 if (!sk->sk_bpf_storage || sk->sk_bpf_storage->smap) in BPF_PROG()
187 __u32 pid = bpf_get_current_pid_tgid() >> 32; in BPF_PROG() local
189 struct sock *sk = sock->sk; in BPF_PROG()
191 if (pid != monitored_pid || !sk) in BPF_PROG()
199 storage->value = DUMMY_STORAGE_VALUE; in BPF_PROG()
204 /* This uses the local storage to remember the inode of the binary that a
210 __u32 pid = bpf_get_current_pid_tgid() >> 32; in BPF_PROG() local
213 if (pid != monitored_pid) in BPF_PROG()
220 storage->exec_inode = bprm->file->f_inode; in BPF_PROG()
222 storage = bpf_inode_storage_get(&inode_storage_map, bprm->file->f_inode, in BPF_PROG()
227 storage->value = DUMMY_STORAGE_VALUE; in BPF_PROG()