OSDN Git Service

Merge branch 'move_BPF_PROG_to_libbpf'
authorAlexei Starovoitov <ast@kernel.org>
Tue, 3 Mar 2020 00:25:15 +0000 (16:25 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 3 Mar 2020 00:25:22 +0000 (16:25 -0800)
commit82dbbfc822cd7230c657b49da6557c8bf2f6621d
treeb8393760f038a2a900c3f565514e9b326589439e
parent15070919f801348e9a9a2ea96f427d8b621f3cd5
parentdf8ff35311c8d10d90b4604c02b32c361dc997aa
Merge branch 'move_BPF_PROG_to_libbpf'

Andrii Nakryiko says:

====================
Move BPF_PROG, BPF_KPROBE, and BPF_KRETPROBE helper macros from private
selftests helpers to public libbpf ones. These helpers are extremely helpful
for writing tracing BPF applications and have been requested to be exposed for
easy use (e.g., [0]).

As part of this move, fix up BPF_KRETPROBE to not allow for capturing input
arguments (as it's unreliable and they will be often clobbered). Also, add
vmlinux.h header guard to allow multi-time inclusion, if necessary; but also
to let PT_REGS_PARM do proper detection of struct pt_regs field names on x86
arch. See relevant patches for more details.

  [0] https://github.com/iovisor/bcc/pull/2778#issue-381642907
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>