linux/Documentation/bpf
Qais Yousef 6939f4ef16 trace: bpf: Allow bpf to attach to bare tracepoints
Some subsystems only have bare tracepoints (a tracepoint with no
associated trace event) to avoid the problem of trace events being an
ABI that can't be changed.

>From bpf presepective, bare tracepoints are what it calls
RAW_TRACEPOINT().

Since bpf assumed there's 1:1 mapping, it relied on hooking to
DEFINE_EVENT() macro to create bpf mapping of the tracepoints. Since
bare tracepoints use DECLARE_TRACE() to create the tracepoint, bpf had
no knowledge about their existence.

By teaching bpf_probe.h to parse DECLARE_TRACE() in a similar fashion to
DEFINE_EVENT(), bpf can find and attach to the new raw tracepoints.

Enabling that comes with the contract that changes to raw tracepoints
don't constitute a regression if they break existing bpf programs.
We need the ability to continue to morph and modify these raw
tracepoints without worrying about any ABI.

Update Documentation/bpf/bpf_design_QA.rst to document this contract.

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210119122237.2426878-2-qais.yousef@arm.com
2021-01-20 14:13:59 -08:00
..
bpf_design_QA.rst trace: bpf: Allow bpf to attach to bare tracepoints 2021-01-20 14:13:59 -08:00
bpf_devel_QA.rst bpf: Migrate from patchwork.ozlabs.org to patchwork.kernel.org. 2020-10-11 22:05:47 +02:00
bpf_lsm.rst bpf: lsm: Add Documentation 2020-03-30 01:35:12 +02:00
btf.rst bpf: Update .BTF_ids section in btf.rst with sets info 2020-08-25 15:41:15 -07:00
drgn.rst bpf: Document bpf_inspect drgn tool 2020-03-26 00:08:36 +01:00
index.rst bpf: sk_lookup: Add user documentation 2020-08-24 14:46:50 -07:00
map_cgroup_storage.rst Documentation/bpf: Document CGROUP_STORAGE map type 2020-07-25 20:16:36 -07:00
prog_cgroup_sockopt.rst bpf: Document optval > PAGE_SIZE behavior for sockopt hooks 2020-06-17 10:54:05 -07:00
prog_cgroup_sysctl.rst bpf: Document BPF_PROG_TYPE_CGROUP_SYSCTL 2019-04-18 16:05:36 -07:00
prog_flow_dissector.rst bpf/flow_dissector: add mode to enforce global BPF flow dissector 2019-10-07 20:16:33 -07:00
prog_sk_lookup.rst bpf: sk_lookup: Add user documentation 2020-08-24 14:46:50 -07:00
ringbuf.rst docs/bpf: Remove source code links 2020-09-14 18:46:54 -07:00
s390.rst bpf: Add s390 testing documentation 2019-10-30 16:25:31 +01:00