Skip to content

tracing: Fix the parser when processing strings w/ or w/o terminated '\0'

[email protected] linux-perf-users lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 5 repliesIn review
  2. v23 patches 2 repliesSuperseded
  3. v13 patches 13 repliesSuperseded

v2 from the cover letter

- Drop 1 old patch and add a new one.
- Stop parsing when '\0' found.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tracing: detect the string termination character when parsing user input stringkernel/trace/trace.c+3 -30 replies
2/3tracing: clear parser->idx if parser gets nothingkernel/trace/trace.c+2 -20 replies
3/3tracing: make sure the parsed string always terminates with '\0'kernel/trace/ftrace.c kernel/trace/trace.c kernel/trace/trace_events.c+2 -60 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNamhyung Kim
SeriesA-b
1/3
2/3
3/3

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

Read the v3 thread

Cover letter [PATCH v3 0/3] tracing: Fix the parser when processing strings w/ or w/o terminated '\0'

From: Changbin Du <[email protected]>

I found there are some problems in the tracing parser when I investiage the root cause of issues mentioned in below patch.
https://patchwork.kernel.org/patch/10132953/

This serials can fix them.

v3: Polish commit msg from Steven Rostedt.
v2:
- Drop 1 old patch and add a new one.
- Stop parsing when '\0' found.

Changbin Du (3):
tracing: detect the string termination character when parsing user
input string
tracing: clear parser->idx if parser gets nothing
tracing: make sure the parsed string always terminates with '\0'

 kernel/trace/ftrace.c       |  2 --
 kernel/trace/trace.c        | 14 +++++++-------
 kernel/trace/trace_events.c |  2 --
 3 files changed, 7 insertions(+), 11 deletions(-)
Signature · 1 line
2.7.4