* [PATCH] bpf: Fix sparse warnings in kprobe_multi_resolve_syms
@ 2022-03-30 11:05 Jiri Olsa
2022-03-30 13:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Olsa @ 2022-03-30 11:05 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
Cc: netdev, bpf, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh
Adding missing __user tags to fix sparse warnings:
kernel/trace/bpf_trace.c:2370:34: warning: incorrect type in argument 2 (different address spaces)
kernel/trace/bpf_trace.c:2370:34: expected void const [noderef] __user *from
kernel/trace/bpf_trace.c:2370:34: got void const *usyms
kernel/trace/bpf_trace.c:2376:51: warning: incorrect type in argument 2 (different address spaces)
kernel/trace/bpf_trace.c:2376:51: expected char const [noderef] __user *src
kernel/trace/bpf_trace.c:2376:51: got char const *
kernel/trace/bpf_trace.c:2443:49: warning: incorrect type in argument 1 (different address spaces)
kernel/trace/bpf_trace.c:2443:49: expected void const *usyms
kernel/trace/bpf_trace.c:2443:49: got void [noderef] __user *[assigned] usyms
Reported-by: Alexei Starovoitov <ast@kernel.org>
Fixes: 0dcac2725406 ("bpf: Add multi kprobe link")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
kernel/trace/bpf_trace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 7fa2ebc07f60..d8553f46caa2 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -2349,11 +2349,11 @@ kprobe_multi_link_handler(struct fprobe *fp, unsigned long entry_ip,
}
static int
-kprobe_multi_resolve_syms(const void *usyms, u32 cnt,
+kprobe_multi_resolve_syms(const void __user *usyms, u32 cnt,
unsigned long *addrs)
{
unsigned long addr, size;
- const char **syms;
+ const char __user **syms;
int err = -ENOMEM;
unsigned int i;
char *func;
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bpf: Fix sparse warnings in kprobe_multi_resolve_syms
2022-03-30 11:05 [PATCH] bpf: Fix sparse warnings in kprobe_multi_resolve_syms Jiri Olsa
@ 2022-03-30 13:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-30 13:30 UTC (permalink / raw)
To: Jiri Olsa
Cc: ast, daniel, andrii, netdev, bpf, kafai, songliubraving, yhs,
john.fastabend, kpsingh
Hello:
This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Wed, 30 Mar 2022 13:05:10 +0200 you wrote:
> Adding missing __user tags to fix sparse warnings:
>
> kernel/trace/bpf_trace.c:2370:34: warning: incorrect type in argument 2 (different address spaces)
> kernel/trace/bpf_trace.c:2370:34: expected void const [noderef] __user *from
> kernel/trace/bpf_trace.c:2370:34: got void const *usyms
> kernel/trace/bpf_trace.c:2376:51: warning: incorrect type in argument 2 (different address spaces)
> kernel/trace/bpf_trace.c:2376:51: expected char const [noderef] __user *src
> kernel/trace/bpf_trace.c:2376:51: got char const *
> kernel/trace/bpf_trace.c:2443:49: warning: incorrect type in argument 1 (different address spaces)
> kernel/trace/bpf_trace.c:2443:49: expected void const *usyms
> kernel/trace/bpf_trace.c:2443:49: got void [noderef] __user *[assigned] usyms
>
> [...]
Here is the summary with links:
- bpf: Fix sparse warnings in kprobe_multi_resolve_syms
https://git.kernel.org/bpf/bpf/c/d31e0386a2f1
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] 2+ messages in thread
end of thread, other threads:[~2022-03-30 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30 11:05 [PATCH] bpf: Fix sparse warnings in kprobe_multi_resolve_syms Jiri Olsa
2022-03-30 13:30 ` 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;
as well as URLs for NNTP newsgroup(s).