Skip to content

tracing: More fixes for 7.2

Steven Rostedt lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ftrace: Add global mutex to serialize trace_parser accesskernel/trace/ftrace.c+13 -00 replies
2/2tracing: perf: Fix stale head for perf syscall tracingkernel/trace/trace_syscalls.c+5 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [for-linus][PATCH 0/2] tracing: More fixes for 7.2

tracing fixes for 7.2:

- Add mutex to protect parser in ftrace filtering

The set_ftrace_filter file uses a parsing descriptor that is allocated at open and modified by writes. If multiple threads were to write to the descriptor at the same time, it can corrupt the parser.

Add a mutex around the modifications of the parser descriptor.

- Fix possible corruption in perf syscall tracing

The perf system call trace events can now read user space. To do so, the reads of user space enable preemption and disables it again. During this time that preemption is enabled, the task can migrate. The perf event list head is assigned via a per CPU pointer. It is done before the user space part is called. If the user space reading migrates the task to another CPU, then the head pointer is no longer valid.

Re-assign the head pointer after the reading of user space to keep it using the correct data.

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes

Head SHA1: 2c2b322acdcc78575b8d6afa64a085cf92e03c12

Steven Rostedt (1):
tracing: perf: Fix stale head for perf syscall tracing

Tengda Wu (1):
ftrace: Add global mutex to serialize trace_parser access

----

 kernel/trace/ftrace.c         | 13 +++++++++++++
 kernel/trace/trace_syscalls.c |  5 +++++
 2 files changed, 18 insertions(+)