From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Delyan Kratunov <delyank@fb.com>,
Randy Dunlap <rdunlap@infradead.org>,
Alexei Starovoitov <ast@kernel.org>,
Sasha Levin <sashal@kernel.org>,
rostedt@goodmis.org, mingo@redhat.com, bpf@vger.kernel.org
Subject: [PATCH AUTOSEL 5.18 36/93] uprobe: gate bpf call behind BPF_EVENTS
Date: Thu, 11 Aug 2022 11:41:30 -0400 [thread overview]
Message-ID: <20220811154237.1531313-36-sashal@kernel.org> (raw)
In-Reply-To: <20220811154237.1531313-1-sashal@kernel.org>
From: Delyan Kratunov <delyank@fb.com>
[ Upstream commit aca80dd95e20f1fa0daa212afc83c9fa0ad239e5 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 9711589273cd..c3937c935239 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -1343,6 +1343,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;
@@ -1352,6 +1353,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.35.1
next prev parent reply other threads:[~2022-08-11 15:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220811154237.1531313-1-sashal@kernel.org>
2022-08-11 15:41 ` [PATCH AUTOSEL 5.18 10/93] bpf, sockmap: Fix sk->sk_forward_alloc warn_on in sk_stream_kill_queues Sasha Levin
2022-08-11 15:41 ` [PATCH AUTOSEL 5.18 14/93] libbpf: Fix an error in 64bit relocation value computation Sasha Levin
2022-08-11 15:41 ` [PATCH AUTOSEL 5.18 23/93] selftests/bpf: Avoid skipping certain subtests Sasha Levin
2022-08-11 15:41 ` Sasha Levin [this message]
2022-08-11 15:41 ` [PATCH AUTOSEL 5.18 48/93] libbpf: fix up few libbpf.map problems Sasha Levin
2022-08-11 15:41 ` [PATCH AUTOSEL 5.18 60/93] libbpf: Disable SEC pragma macro on GCC Sasha Levin
2022-08-11 15:41 ` [PATCH AUTOSEL 5.18 61/93] bpf: Make non-preallocated allocation low priority Sasha Levin
2022-08-11 15:41 ` [PATCH AUTOSEL 5.18 65/93] bpf: Fix check against plain integer v 'NULL' Sasha Levin
2022-08-11 15:42 ` [PATCH AUTOSEL 5.18 69/93] bpf: Don't redirect packets with invalid pkt_len Sasha Levin
2022-08-11 15:42 ` [PATCH AUTOSEL 5.18 81/93] bpf/selftests: Fix couldn't retrieve pinned program in xdp veth test Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220811154237.1531313-36-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=delyank@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox