]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add bpf_copy_from_user_task() helper
authorKenny Yu <kennyyu@fb.com>
Mon, 24 Jan 2022 18:54:01 +0000 (10:54 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Jan 2022 03:59:27 +0000 (19:59 -0800)
commita9c88998a8222ed49210714dde0ec23c62cb8274
tree19b75a8c70bc27d8569ebdaf18079494a525bd82
parent05d7922819ed39e07adb1757de88d3dff70e8909
bpf: Add bpf_copy_from_user_task() helper

This adds a helper for bpf programs to read the memory of other
tasks.

As an example use case at Meta, we are using a bpf task iterator program
and this new helper to print C++ async stack traces for all threads of
a given process.

Signed-off-by: Kenny Yu <kennyyu@fb.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20220124185403.468466-3-kennyyu@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/helpers.c
kernel/trace/bpf_trace.c
tools/include/uapi/linux/bpf.h