Lines Matching refs:task
19 static struct __tasks_kfunc_map_value *insert_lookup_task(struct task_struct *task) in insert_lookup_task() argument
23 status = tasks_kfunc_map_insert(task); in insert_lookup_task()
27 return tasks_kfunc_map_value_lookup(task); in insert_lookup_task()
32 int BPF_PROG(task_kfunc_acquire_untrusted, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
37 v = insert_lookup_task(task); in BPF_PROG()
42 acquired = bpf_task_acquire(v->task); in BPF_PROG()
53 int BPF_PROG(task_kfunc_acquire_fp, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
69 int BPF_PROG(task_kfunc_acquire_unsafe_kretprobe, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
74 acquired = bpf_task_acquire(task); in BPF_PROG()
84 int BPF_PROG(task_kfunc_acquire_unsafe_kretprobe_rcu, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
89 if (!task) { in BPF_PROG()
94 acquired = bpf_task_acquire(task); in BPF_PROG()
104 int BPF_PROG(task_kfunc_acquire_null, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
119 int BPF_PROG(task_kfunc_acquire_unreleased, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
123 acquired = bpf_task_acquire(task); in BPF_PROG()
133 int BPF_PROG(task_kfunc_xchg_unreleased, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
138 v = insert_lookup_task(task); in BPF_PROG()
142 kptr = bpf_kptr_xchg(&v->task, NULL); in BPF_PROG()
153 int BPF_PROG(task_kfunc_acquire_release_no_null_check, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
157 acquired = bpf_task_acquire(task); in BPF_PROG()
166 int BPF_PROG(task_kfunc_release_untrusted, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
170 v = insert_lookup_task(task); in BPF_PROG()
175 bpf_task_release(v->task); in BPF_PROG()
182 int BPF_PROG(task_kfunc_release_fp, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
194 int BPF_PROG(task_kfunc_release_null, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
201 status = bpf_probe_read_kernel(&pid, sizeof(pid), &task->pid); in BPF_PROG()
205 local.task = NULL; in BPF_PROG()
214 acquired = bpf_task_acquire(task); in BPF_PROG()
218 old = bpf_kptr_xchg(&v->task, acquired); in BPF_PROG()
228 int BPF_PROG(task_kfunc_release_unacquired, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
231 bpf_task_release(task); in BPF_PROG()
238 int BPF_PROG(task_kfunc_from_pid_no_null_check, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
242 acquired = bpf_task_from_pid(task->pid); in BPF_PROG()
252 int BPF_PROG(task_kfunc_from_lsm_task_free, struct task_struct *task) in BPF_PROG() argument
257 acquired = bpf_task_acquire(task); in BPF_PROG()
267 int BPF_PROG(task_access_comm1, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
269 bpf_strncmp(task->comm, 17, "foo"); in BPF_PROG()
275 int BPF_PROG(task_access_comm2, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
277 bpf_strncmp(task->comm + 1, 16, "foo"); in BPF_PROG()
283 int BPF_PROG(task_access_comm3, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
285 bpf_probe_read_kernel(task->comm, 16, task->comm); in BPF_PROG()
291 int BPF_PROG(task_access_comm4, struct task_struct *task, const char *buf, bool exec) in BPF_PROG() argument
297 bpf_strncmp(task->comm, 16, "foo"); in BPF_PROG()
303 int BPF_PROG(task_kfunc_release_in_map, struct task_struct *task, u64 clone_flags) in BPF_PROG() argument
308 if (tasks_kfunc_map_insert(task)) in BPF_PROG()
311 v = tasks_kfunc_map_value_lookup(task); in BPF_PROG()
316 local = v->task; in BPF_PROG()