[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250417203438.413da315@batman.local.home>
Date: Thu, 17 Apr 2025 20:34:38 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
<linux-trace-kernel@...r.kernel.org>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrii Nakryiko <andrii.nakryiko@...il.com>, Mykyta Yatsenko
<mykyta.yatsenko5@...il.com>
Subject: Re: [PATCH] tracing: Fix filter string testing
On Thu, 17 Apr 2025 16:29:27 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Thu, 17 Apr 2025 18:30:03 -0400 Steven Rostedt <rostedt@...dmis.org> wrote:
>
> > From: Steven Rostedt <rostedt@...dmis.org>
> >
> > The filter string testing uses strncpy_from_kernel/user_nofault() to
> > retrieve the string to test the filter against. The if() statement was
> > incorrect as it considered 0 as a fault, when it is only negative that it
> > faulted.
>
> changelog forgot to describe the userspace-visible effects of the bug?
>
> > Cc: stable@...r.kernel.org
>
> Which is more important when proposing this!
>
I can update the change log to show how it's broken. In fact, I'm
working on a selftest to catch it if it breaks again.
# cd /sys/kernel/tracing
# echo "filename.ustring ~ \"/proc*\"" > events/syscalls/sys_enter_openat/filter
# ls /proc/$$/maps
# cat trace
If it works you get:
ls-1192 [007] ..... 8169.828333: sys_openat(dfd: ffffffffffffff9c, filename: 7efc18359904, flags: 80000, mode: 0)
If not, you get nothing!
-- Steve
Powered by blists - more mailing lists