Re: [PATCH bpf-next v5] libbpf: introduce legacy kprobe events support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Allow kprobe tracepoint events creation through legacy interface, as the
> kprobe dynamic PMUs support, used by default, was only created in v4.17.
> 
> After commit "bpf: implement minimal BPF perf link", it was allowed that
> some extra - to the link - information is accessed through container_of
> struct bpf_link. This allows the tracing perf event legacy name, and
> information whether it is a retprobe, to be saved outside bpf_link
> structure, which would not be optimal.
> 
> This enables CO-RE support for older kernels.
> 
> Cc: Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>
> Signed-off-by: Rafael David Tinoco <rafaeldtinoco@xxxxxxxxx>

Tested using: https://github.com/rafaeldtinoco/portablebpf

Single execution:

# cat kernel/debug/tracing/kprobe_events
p:kprobes/tcp_connect_libbpf_20166 tcp_connect
r4:kretprobes/tcp_connect_libbpf_20166 tcp_connect

Simultaneous execution:

# cat kernel/debug/tracing/kprobe_events
p:kprobes/tcp_connect_libbpf_20166 tcp_connect
r4:kretprobes/tcp_connect_libbpf_20166 tcp_connect
p:kprobes/tcp_connect_libbpf_20177 tcp_connect
r4:kretprobes/tcp_connect_libbpf_20177 tcp_connect

kprobe_events was cleared after execution.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux