bpf: Support writable context for bare tracepoint
authorHou Tao <houtao1@huawei.com>
Mon, 4 Oct 2021 09:48:55 +0000 (17:48 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Oct 2021 20:22:57 +0000 (13:22 -0700)
commit65223741ae1b759a14cab84ba88888bb025f816d
treeb1414ab5924b46bd658b8da7df05975f98365165
parent1c8dab7da1d27a474721a789777af82edf2085c1
bpf: Support writable context for bare tracepoint

Commit 9df1c28bb752 ("bpf: add writable context for raw tracepoints")
supports writable context for tracepoint, but it misses the support
for bare tracepoint which has no associated trace event.

Bare tracepoint is defined by DECLARE_TRACE(), so adding a corresponding
DECLARE_TRACE_WRITABLE() macro to generate a definition in __bpf_raw_tp_map
section for bare tracepoint in a similar way to DEFINE_TRACE_WRITABLE().

Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211004094857.30868-2-hotforest@gmail.com
include/trace/bpf_probe.h