From: Steven Rostedt <rostedt@goodmis.org>
To: David Carlier <devnexen@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing/filters: Fix MATCH_END_ONLY on dynamic char arrays
Date: Thu, 3 Dec 2026 08:28:56 -0500 [thread overview]
Message-ID: <20261203082856.79aec9cf@gandalf.local.home> (raw)
In-Reply-To: <20261126215228.1205862-1-devnexen@gmail.com>
On Thu, 26 Nov 2026 21:52:28 +0000
David Carlier <devnexen@gmail.com> wrote:
> regex_match_end() takes the string length as "len - 1", which holds
> for __string() fields where the length counts the trailing NUL. A
> __dynamic_array() of char does not have to be NUL-terminated or
> filled to its length. The xfs namespace events copy name->len bytes
> with no NUL, so the compare is off by one:
>
> # echo 'name ~ "*.txt"' > events/xfs/xfs_lookup/filter
>
> misses "foo.txt" and matches "a.txtz".
>
> Use regex_match_end_str() for dynamic strings as well, which finds
> the end with strnlen().
After this change, does anything actually use regex_match_end?
Why not just remove it or replace it with regex_match_end_str?
-- Steve
prev parent reply other threads:[~2026-12-03 13:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 21:52 [PATCH] tracing/filters: Fix MATCH_END_ONLY on dynamic char arrays David Carlier
2026-12-03 13:28 ` Steven Rostedt [this message]
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=20261203082856.79aec9cf@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=devnexen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@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