mbox series

[v3,bpf-next,0/2] Allow attaching to bare tracepoints

Message ID 20210119122237.2426878-1-qais.yousef@arm.com (mailing list archive)
Headers show
Series Allow attaching to bare tracepoints | expand

Message

Qais Yousef Jan. 19, 2021, 12:22 p.m. UTC
Changes in v3:
	* Fix not returning error value correctly in
	  trigger_module_test_write() (Yonghong)
	* Add Yonghong acked-by to patch 1.

Changes in v2:
	* Fix compilation error. (Andrii)
	* Make the new test use write() instead of read() (Andrii)

Add some missing glue logic to teach bpf about bare tracepoints - tracepoints
without any trace event associated with them.

Bare tracepoints are declare with DECLARE_TRACE(). Full tracepoints are declare
with TRACE_EVENT().

BPF can attach to these tracepoints as RAW_TRACEPOINT() only as there're no
events in tracefs created with them.

Qais Yousef (2):
  trace: bpf: Allow bpf to attach to bare tracepoints
  selftests: bpf: Add a new test for bare tracepoints

 Documentation/bpf/bpf_design_QA.rst           |  6 +++++
 include/trace/bpf_probe.h                     | 12 +++++++--
 .../bpf/bpf_testmod/bpf_testmod-events.h      |  6 +++++
 .../selftests/bpf/bpf_testmod/bpf_testmod.c   | 21 ++++++++++++++-
 .../selftests/bpf/bpf_testmod/bpf_testmod.h   |  6 +++++
 .../selftests/bpf/prog_tests/module_attach.c  | 27 +++++++++++++++++++
 .../selftests/bpf/progs/test_module_attach.c  | 10 +++++++
 7 files changed, 85 insertions(+), 3 deletions(-)

Comments

Alexei Starovoitov Jan. 19, 2021, 9:06 p.m. UTC | #1
On Tue, Jan 19, 2021 at 4:22 AM Qais Yousef <qais.yousef@arm.com> wrote:
>
> Changes in v3:
>         * Fix not returning error value correctly in
>           trigger_module_test_write() (Yonghong)
>         * Add Yonghong acked-by to patch 1.

Applied. Thanks