BPF Archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 1/2] libbpf: Fix error message in attach_kprobe_session
@ 2024-05-02  7:55 Jiri Olsa
  2024-05-02  7:55 ` [PATCH bpf-next 2/2] libbpf: Fix error message in attach_kprobe_multi Jiri Olsa
  2024-05-02 16:30 ` [PATCH bpf-next 1/2] libbpf: Fix error message in attach_kprobe_session patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Olsa @ 2024-05-02  7:55 UTC (permalink / raw
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: bpf, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo

We just failed to retrieve pattern, so we need to print spec instead.

Fixes: 2ca178f02b2f ("libbpf: Add support for kprobe session attach")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/lib/bpf/libbpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 4ffc8873d1ad..68c87aed8335 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -11605,7 +11605,7 @@ static int attach_kprobe_session(const struct bpf_program *prog, long cookie,
 	spec = prog->sec_name + sizeof("kprobe.session/") - 1;
 	n = sscanf(spec, "%m[a-zA-Z0-9_.*?]", &pattern);
 	if (n < 1) {
-		pr_warn("kprobe session pattern is invalid: %s\n", pattern);
+		pr_warn("kprobe session pattern is invalid: %s\n", spec);
 		return -EINVAL;
 	}
 
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH bpf-next 2/2] libbpf: Fix error message in attach_kprobe_multi
  2024-05-02  7:55 [PATCH bpf-next 1/2] libbpf: Fix error message in attach_kprobe_session Jiri Olsa
@ 2024-05-02  7:55 ` Jiri Olsa
  2024-05-02 16:30 ` [PATCH bpf-next 1/2] libbpf: Fix error message in attach_kprobe_session patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2024-05-02  7:55 UTC (permalink / raw
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: bpf, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo

We just failed to retrieve pattern, so we need to print spec instead.

Fixes: ddc6b04989eb ("libbpf: Add bpf_program__attach_kprobe_multi_opts function")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/lib/bpf/libbpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 68c87aed8335..a3566a456bc8 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -11579,7 +11579,7 @@ static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, stru
 
 	n = sscanf(spec, "%m[a-zA-Z0-9_.*?]", &pattern);
 	if (n < 1) {
-		pr_warn("kprobe multi pattern is invalid: %s\n", pattern);
+		pr_warn("kprobe multi pattern is invalid: %s\n", spec);
 		return -EINVAL;
 	}
 
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next 1/2] libbpf: Fix error message in attach_kprobe_session
  2024-05-02  7:55 [PATCH bpf-next 1/2] libbpf: Fix error message in attach_kprobe_session Jiri Olsa
  2024-05-02  7:55 ` [PATCH bpf-next 2/2] libbpf: Fix error message in attach_kprobe_multi Jiri Olsa
@ 2024-05-02 16:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-02 16:30 UTC (permalink / raw
  To: Jiri Olsa
  Cc: ast, daniel, andrii, bpf, kafai, songliubraving, yhs,
	john.fastabend, kpsingh, sdf, haoluo

Hello:

This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Thu,  2 May 2024 09:55:40 +0200 you wrote:
> We just failed to retrieve pattern, so we need to print spec instead.
> 
> Fixes: 2ca178f02b2f ("libbpf: Add support for kprobe session attach")
> Reported-by: Andrii Nakryiko <andrii@kernel.org>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/lib/bpf/libbpf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [bpf-next,1/2] libbpf: Fix error message in attach_kprobe_session
    https://git.kernel.org/bpf/bpf-next/c/5a3941f84b8f
  - [bpf-next,2/2] libbpf: Fix error message in attach_kprobe_multi
    https://git.kernel.org/bpf/bpf-next/c/7c13ef16e87a

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:[~2024-05-02 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02  7:55 [PATCH bpf-next 1/2] libbpf: Fix error message in attach_kprobe_session Jiri Olsa
2024-05-02  7:55 ` [PATCH bpf-next 2/2] libbpf: Fix error message in attach_kprobe_multi Jiri Olsa
2024-05-02 16:30 ` [PATCH bpf-next 1/2] libbpf: Fix error message in attach_kprobe_session 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 read-only IMAP folder(s) and NNTP newsgroup(s).