Lines Matching refs:task
51 struct task_struct *task = owner; in task_storage_ptr() local
53 return &task->bpf_storage; in task_storage_ptr()
57 task_storage_lookup(struct task_struct *task, struct bpf_map *map, in task_storage_lookup() argument
64 rcu_dereference_check(task->bpf_storage, bpf_rcu_lock_held()); in task_storage_lookup()
72 void bpf_task_storage_free(struct task_struct *task) in bpf_task_storage_free() argument
78 local_storage = rcu_dereference(task->bpf_storage); in bpf_task_storage_free()
93 struct task_struct *task; in bpf_pid_task_storage_lookup_elem() local
107 task = pid_task(pid, PIDTYPE_PID); in bpf_pid_task_storage_lookup_elem()
108 if (!task) { in bpf_pid_task_storage_lookup_elem()
114 sdata = task_storage_lookup(task, map, true); in bpf_pid_task_storage_lookup_elem()
127 struct task_struct *task; in bpf_pid_task_storage_update_elem() local
141 task = pid_task(pid, PIDTYPE_PID); in bpf_pid_task_storage_update_elem()
142 if (!task) { in bpf_pid_task_storage_update_elem()
149 task, (struct bpf_local_storage_map *)map, value, map_flags, in bpf_pid_task_storage_update_elem()
159 static int task_storage_delete(struct task_struct *task, struct bpf_map *map, in task_storage_delete() argument
164 sdata = task_storage_lookup(task, map, false); in task_storage_delete()
178 struct task_struct *task; in bpf_pid_task_storage_delete_elem() local
192 task = pid_task(pid, PIDTYPE_PID); in bpf_pid_task_storage_delete_elem()
193 if (!task) { in bpf_pid_task_storage_delete_elem()
199 err = task_storage_delete(task, map, true); in bpf_pid_task_storage_delete_elem()
208 struct task_struct *task, void *value, in __bpf_task_storage_get() argument
213 sdata = task_storage_lookup(task, map, nobusy); in __bpf_task_storage_get()
218 if (refcount_read(&task->usage) && in __bpf_task_storage_get()
221 task, (struct bpf_local_storage_map *)map, value, in __bpf_task_storage_get()
231 task, void *, value, u64, flags, gfp_t, gfp_flags) in BPF_CALL_5()
237 if (flags & ~BPF_LOCAL_STORAGE_GET_F_CREATE || !task) in BPF_CALL_5()
241 data = __bpf_task_storage_get(map, task, value, flags, in BPF_CALL_5()
250 task, void *, value, u64, flags, gfp_t, gfp_flags) in BPF_CALL_5()
255 if (flags & ~BPF_LOCAL_STORAGE_GET_F_CREATE || !task) in BPF_CALL_5()
259 data = __bpf_task_storage_get(map, task, value, flags, in BPF_CALL_5()
266 task) in BPF_CALL_2()
272 if (!task) in BPF_CALL_2()
280 ret = task_storage_delete(task, map, nobusy); in BPF_CALL_2()
287 task) in BPF_CALL_2()
292 if (!task) in BPF_CALL_2()
300 ret = task_storage_delete(task, map, true); in BPF_CALL_2()