]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Added new helper bpf_get_ns_current_pid_tgid
authorCarlos Neira <cneirabustos@gmail.com>
Wed, 4 Mar 2020 20:41:56 +0000 (17:41 -0300)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 13 Mar 2020 00:33:11 +0000 (17:33 -0700)
commit79b73c27d42e68ff454f6d7d593c1c8b05681afa
tree2a1bcba2ff5a85b3fb0e0013b01ac25eef4cc6fa
parentc9840565ca1e9b328c325796bfe9b5ce63f3f604
bpf: Added new helper bpf_get_ns_current_pid_tgid

New bpf helper bpf_get_ns_current_pid_tgid,
This helper will return pid and tgid from current task
which namespace matches dev_t and inode number provided,
this will allows us to instrument a process inside a container.

Signed-off-by: Carlos Neira <cneirabustos@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200304204157.58695-3-cneirabustos@gmail.com
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/core.c
kernel/bpf/helpers.c
kernel/trace/bpf_trace.c
scripts/bpf_helpers_doc.py
tools/include/uapi/linux/bpf.h