Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

uprobe: gate bpf call behind BPF_EVENTS

The call into bpf from uprobes needs to be gated now that it doesn't use
the trace_events.h helpers.

Randy found this as a randconfig build failure on linux-next [1].

[1]: https://lore.kernel.org/linux-next/2de99180-7d55-2fdf-134d-33198c27cc58@infradead.org/

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Delyan Kratunov <delyank@fb.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/cb8bfbbcde87ed5d811227a393ef4925f2aadb7b.camel@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Delyan Kratunov and committed by
Alexei Starovoitov
aca80dd9 e068c077

+2
+2
kernel/trace/trace_uprobe.c
··· 1344 1344 int size, esize; 1345 1345 int rctx; 1346 1346 1347 + #ifdef CONFIG_BPF_EVENTS 1347 1348 if (bpf_prog_array_valid(call)) { 1348 1349 u32 ret; 1349 1350 ··· 1352 1351 if (!ret) 1353 1352 return; 1354 1353 } 1354 + #endif /* CONFIG_BPF_EVENTS */ 1355 1355 1356 1356 esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu)); 1357 1357