mbox series

[bpf,0/3] bpf: Make BPF trampoline friendly to ftrace

Message ID 20191209000114.1876138-1-ast@kernel.org
Headers show
Series bpf: Make BPF trampoline friendly to ftrace | expand

Message

Alexei Starovoitov Dec. 9, 2019, 12:01 a.m. UTC
Patch 1 - fix crash function_graph tracer encounters BPF trampoline
Patch 2 - use register_ftrace_direct() API to attach BPF trampoline
Patch 3 - simple test

Alexei Starovoitov (3):
  ftrace: Fix function_graph tracer interaction with BPF trampoline
  bpf: Make BPF trampoline use register_ftrace_direct() API
  selftests/bpf: test function_graph tracer and bpf trampoline together

 arch/x86/kernel/ftrace.c                   | 14 -----
 include/linux/bpf.h                        |  1 +
 include/linux/ftrace.h                     |  5 ++
 kernel/bpf/trampoline.c                    | 64 ++++++++++++++++++++--
 kernel/trace/fgraph.c                      |  9 +++
 kernel/trace/ftrace.c                      | 19 +++----
 tools/testing/selftests/bpf/test_ftrace.sh | 39 +++++++++++++
 7 files changed, 119 insertions(+), 32 deletions(-)
 create mode 100755 tools/testing/selftests/bpf/test_ftrace.sh

Comments

Martin KaFai Lau Dec. 9, 2019, 6:42 p.m. UTC | #1
On Sun, Dec 08, 2019 at 04:01:11PM -0800, Alexei Starovoitov wrote:
> Patch 1 - fix crash function_graph tracer encounters BPF trampoline
> Patch 2 - use register_ftrace_direct() API to attach BPF trampoline
> Patch 3 - simple test
> 
> Alexei Starovoitov (3):
>   ftrace: Fix function_graph tracer interaction with BPF trampoline
>   bpf: Make BPF trampoline use register_ftrace_direct() API
>   selftests/bpf: test function_graph tracer and bpf trampoline together
Acked-by: Martin KaFai Lau <kafai@fb.com>