diff options
| author | Brian Norris <briannorris@chromium.org> | 2026-11-16 18:27:10 -0800 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-11-20 10:02:37 -0500 |
| commit | 4d0d961873409168e77c6bbc1453fcf8ade37788 (patch) | |
| tree | a0ab977dab7efe9c7eb039027ece9a46b7ddf73d /rust/kernel/alloc | |
| parent | 210bc23d47088f4962df85a807b05c5c8fc99215 (diff) | |
tracing: Properly match strings that start with numbers
As an optimization, set_ftrace_filter supports writing indices (numbers)
instead of function names. This support was added to the generic glob
(fake regex) function, which breaks the ability to filter string
patterns that start with a number. For example, PCI device names tend to
look like '0001:01:00.0', and a reasonable filter might be:
echo 'name ~ "0001:*"' > /sys/kernel/tracing/events/rpm/rpm_resume/filter
Move the MATCH_INDEX code out to the only place it actually was intended
to work -- ftrace match_records(), with a 'func' and no 'mod'.
As a side effect, this also fixes :mod:<module> function filtering for
modules whose names start with a digit.
Link: https://patch.msgid.link/20261116182710.1.Ic0625a2bd2e6f8960c0f75e5d15f14f3c84d1d38@changeid
Fixes: f79b3f338564 ("ftrace: Allow enabling of filters via index of available_filter_functions")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions
