Skip to content

tracing: Fix bugs in string filters.

Li Zefan lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/27 patches 10 repliesIn review
  2. v1 posting 1/27 patches 2 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ftrace: Fix MATCH_END_ONLY function filterkernel/trace/ftrace.c+3 -31 reply
2/7tracing/filters: Fix MATCH_FRONT_ONLY filter matchingkernel/trace/trace_events_filter.c+1 -11 reply
3/7tracing/filters: Fix MATCH_END_ONLY filter matchingkernel/trace/trace_events_filter.c+3 -21 reply
4/7lib: Introduce strnstr()include/linux/string.h lib/string.c+30 -24 replies
5/7tracing/filters: Fix MATCH_MIDDLE_ONLY filter matchingkernel/trace/trace_events_filter.c+1 -11 reply
6/7tracing/filters: Fix MATCH_END_ONLY filter matching for PTR_STRINGkernel/trace/trace_events_filter.c+3 -41 reply
7/7tracing/filters: Add comment for match callbackskernel/trace/trace_events_filter.c+12 -11 reply

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchFrederic Weisbecker
1/7A-b A-b
2/7A-b A-b
3/7A-b A-b
4/7A-b A-b
5/7A-b A-b
6/7A-b A-b
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7][RESEND] tracing: Fix bugs in string filters.

This patchset fixes some bugs in string filters. Those bugs affect both ftrace and perf-trace.

A new string helper strnstr() is introduced, to be used in middle matching callback.

Also I add some comments to mainly explain why we should use length-limited version of strstr() and strcmp().

---
 include/linux/string.h             |    5 ++++-
 kernel/trace/ftrace.c              |    6 +++---
 kernel/trace/trace_events_filter.c |   29 ++++++++++++++++++++---------
 lib/string.c                       |   27 ++++++++++++++++++++++++++-
 4 files changed, 53 insertions(+), 14 deletions(-)