summaryrefslogtreecommitdiff
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorDavid Vernet <void@manifault.com>2022-11-22 08:52:59 -0600
committerAlexei Starovoitov <ast@kernel.org>2022-11-23 17:45:23 -0800
commit3f0e6f2b41d35d4446160c745e8f09037447dd8f (patch)
treeb175c6182c6108a34cfe5d9eda1218fd17cd0151 /kernel/auditsc.c
parent5bad3587b7a292148cea10185cd8770baaeb7445 (diff)
bpf: Add bpf_task_from_pid() kfunc
Callers can currently store tasks as kptrs using bpf_task_acquire(), bpf_task_kptr_get(), and bpf_task_release(). These are useful if a caller already has a struct task_struct *, but there may be some callers who only have a pid, and want to look up the associated struct task_struct * from that to e.g. find task->comm. This patch therefore adds a new bpf_task_from_pid() kfunc which allows BPF programs to get a struct task_struct * kptr from a pid. Signed-off-by: David Vernet <void@manifault.com> Link: https://lore.kernel.org/r/20221122145300.251210-2-void@manifault.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/auditsc.c')
0 files changed, 0 insertions, 0 deletions