* [PATCH bpf-next] bpftool: Fix inverted tracefs validation when scanning /proc/mounts
@ 2026-10-16 1:50 chenyuan_fl
2026-10-16 13:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: chenyuan_fl @ 2026-10-16 1:50 UTC (permalink / raw)
To: bpf
Cc: Yuan Chen, Quentin Monnet, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Eduard Zingerman, Kumar Kartikeya Dwivedi,
Martin KaFai Lau, Song Liu, Yonghong Song, Jiri Olsa,
Emil Tsalapatis, Ihor Solodrai, Jakub Kicinski, linux-kernel
From: Yuan Chen <chenyuan@kylinos.cn>
The /proc/mounts fallback in get_tracefs_pipe() accepts only
non-tracefs mount points, so a tracefs mounted outside the default
locations is ignored: bpftool prog tracelog then mounts a second
tracefs, or exits silently with --nomount. Negate the condition.
Fixes: be3245e22d22 ("tools: bpftool: attempt to mount tracefs if required for tracelog cmd")
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
---
tools/bpf/bpftool/tracelog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/tracelog.c b/tools/bpf/bpftool/tracelog.c
index 573a8d99f009..e104748c8350 100644
--- a/tools/bpf/bpftool/tracelog.c
+++ b/tools/bpf/bpftool/tracelog.c
@@ -86,7 +86,7 @@ static bool get_tracefs_pipe(char *mnt)
fclose(fp);
/* The string from fscanf() might be truncated, check mnt is valid */
- if (found && validate_tracefs_mnt(mnt, TRACEFS_MAGIC))
+ if (found && !validate_tracefs_mnt(mnt, TRACEFS_MAGIC))
goto exit_found;
if (block_mount)
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] bpftool: Fix inverted tracefs validation when scanning /proc/mounts
2026-10-16 1:50 [PATCH bpf-next] bpftool: Fix inverted tracefs validation when scanning /proc/mounts chenyuan_fl
@ 2026-10-16 13:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-16 13:40 UTC (permalink / raw)
To: chenyuan
Cc: bpf, chenyuan, qmo, ast, daniel, andrii, eddyz87, memxor,
martin.lau, song, yonghong.song, jolsa, emil, ihor.solodrai, kuba,
linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Fri, 16 Oct 2026 09:50:57 +0800 you wrote:
> From: Yuan Chen <chenyuan@kylinos.cn>
>
> The /proc/mounts fallback in get_tracefs_pipe() accepts only
> non-tracefs mount points, so a tracefs mounted outside the default
> locations is ignored: bpftool prog tracelog then mounts a second
> tracefs, or exits silently with --nomount. Negate the condition.
>
> [...]
Here is the summary with links:
- [bpf-next] bpftool: Fix inverted tracefs validation when scanning /proc/mounts
https://git.kernel.org/bpf/bpf-next/c/21c755efaab1
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:[~2026-10-16 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 1:50 [PATCH bpf-next] bpftool: Fix inverted tracefs validation when scanning /proc/mounts chenyuan_fl
2026-10-16 13:40 ` 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