* [PATCH bpf-next] uprobe: gate bpf call behind BPF_EVENTS
@ 2022-06-20 21:47 Delyan Kratunov
2022-06-20 21:58 ` Randy Dunlap
2022-06-21 0:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Delyan Kratunov @ 2022-06-20 21:47 UTC (permalink / raw)
To: daniel@iogearbox.net, ast@kernel.org, andrii@kernel.org,
bpf@vger.kernel.org
Cc: rostedt@goodmis.org, rdunlap@infradead.org
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>
---
kernel/trace/trace_uprobe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 0282c119b1b2..326235fd2346 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -1344,6 +1344,7 @@ static void __uprobe_perf_func(struct trace_uprobe *tu,
int size, esize;
int rctx;
+#ifdef CONFIG_BPF_EVENTS
if (bpf_prog_array_valid(call)) {
u32 ret;
@@ -1351,6 +1352,7 @@ static void __uprobe_perf_func(struct trace_uprobe *tu,
if (!ret)
return;
}
+#endif /* CONFIG_BPF_EVENTS */
esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));
--
2.36.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next] uprobe: gate bpf call behind BPF_EVENTS
2022-06-20 21:47 [PATCH bpf-next] uprobe: gate bpf call behind BPF_EVENTS Delyan Kratunov
@ 2022-06-20 21:58 ` Randy Dunlap
2022-06-21 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2022-06-20 21:58 UTC (permalink / raw)
To: Delyan Kratunov, daniel@iogearbox.net, ast@kernel.org,
andrii@kernel.org, bpf@vger.kernel.org
Cc: rostedt@goodmis.org
On 6/20/22 14:47, Delyan Kratunov wrote:
> 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>
Thanks.
> ---
> kernel/trace/trace_uprobe.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
> index 0282c119b1b2..326235fd2346 100644
> --- a/kernel/trace/trace_uprobe.c
> +++ b/kernel/trace/trace_uprobe.c
> @@ -1344,6 +1344,7 @@ static void __uprobe_perf_func(struct trace_uprobe *tu,
> int size, esize;
> int rctx;
>
> +#ifdef CONFIG_BPF_EVENTS
> if (bpf_prog_array_valid(call)) {
> u32 ret;
>
> @@ -1351,6 +1352,7 @@ static void __uprobe_perf_func(struct trace_uprobe *tu,
> if (!ret)
> return;
> }
> +#endif /* CONFIG_BPF_EVENTS */
>
> esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));
>
> --
> 2.36.1
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next] uprobe: gate bpf call behind BPF_EVENTS
2022-06-20 21:47 [PATCH bpf-next] uprobe: gate bpf call behind BPF_EVENTS Delyan Kratunov
2022-06-20 21:58 ` Randy Dunlap
@ 2022-06-21 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-21 0:10 UTC (permalink / raw)
To: Delyan Kratunov; +Cc: daniel, ast, andrii, bpf, rostedt, rdunlap
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Mon, 20 Jun 2022 21:47:55 +0000 you wrote:
> 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/
>
> [...]
Here is the summary with links:
- [bpf-next] uprobe: gate bpf call behind BPF_EVENTS
https://git.kernel.org/bpf/bpf-next/c/aca80dd95e20
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-21 0:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-20 21:47 [PATCH bpf-next] uprobe: gate bpf call behind BPF_EVENTS Delyan Kratunov
2022-06-20 21:58 ` Randy Dunlap
2022-06-21 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox