diff options
author | Juntong Deng <juntong.deng@outlook.com> | 2024-10-14 10:21:08 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-10-16 09:21:18 -0700 |
commit | 675c3596ff32c040d1dd2e28dd57e83e634b9f60 (patch) | |
tree | 7e6e15f1c82074493a04863cde253fb509fdb71c /kernel/kallsyms_selftest.c | |
parent | 1477d31b1c9a661a253a644b950f5ce438e4821c (diff) |
bpf: Add bpf_task_from_vpid() kfunc
bpf_task_from_pid() that currently exists looks up the
struct task_struct corresponding to the pid in the root pid
namespace (init_pid_ns).
This patch adds bpf_task_from_vpid() which looks up the
struct task_struct corresponding to vpid in the pid namespace
of the current process.
This is useful for getting information about other processes
in the same pid namespace.
Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
Link: https://lore.kernel.org/r/AM6PR03MB5848E50DA58F79CDE65433C399442@AM6PR03MB5848.eurprd03.prod.outlook.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/kallsyms_selftest.c')
0 files changed, 0 insertions, 0 deletions