Commit 4de8ebef authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'trace-fixes-v4.5-rc5' of...

Merge tag 'trace-fixes-v4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
 "Two more small fixes.

  One is by Yang Shi who added a READ_ONCE_NOCHECK() to the scan of the
  stack made by the stack tracer.  As the stack tracer scans the entire
  kernel stack, KASAN triggers seeing it as a "stack out of bounds"
  error.  As the scan is looking at the contents of the stack from
  parent functions.  The NOCHECK() tells KASAN that this is done on
  purpose, and is not some kind of stack overflow.

  The second fix is to the ftrace selftests, to retrieve the PID of
  executed commands from the shell with '$!' and not by parsing 'jobs'"

* tag 'trace-fixes-v4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing, kasan: Silence Kasan warning in check_stack of stack_tracer
  ftracetest: Fix instance test to use proper shell command for pids
parents 692b8c66 6e22c836
...@@ -156,7 +156,11 @@ check_stack(unsigned long ip, unsigned long *stack) ...@@ -156,7 +156,11 @@ check_stack(unsigned long ip, unsigned long *stack)
for (; p < top && i < stack_trace_max.nr_entries; p++) { for (; p < top && i < stack_trace_max.nr_entries; p++) {
if (stack_dump_trace[i] == ULONG_MAX) if (stack_dump_trace[i] == ULONG_MAX)
break; break;
if (*p == stack_dump_trace[i]) { /*
* The READ_ONCE_NOCHECK is used to let KASAN know that
* this is not a stack-out-of-bounds error.
*/
if ((READ_ONCE_NOCHECK(*p)) == stack_dump_trace[i]) {
stack_dump_trace[x] = stack_dump_trace[i++]; stack_dump_trace[x] = stack_dump_trace[i++];
this_size = stack_trace_index[x++] = this_size = stack_trace_index[x++] =
(top - p) * sizeof(unsigned long); (top - p) * sizeof(unsigned long);
......
...@@ -39,28 +39,23 @@ instance_slam() { ...@@ -39,28 +39,23 @@ instance_slam() {
} }
instance_slam & instance_slam &
x=`jobs -l` p1=$!
p1=`echo $x | cut -d' ' -f2`
echo $p1 echo $p1
instance_slam & instance_slam &
x=`jobs -l | tail -1` p2=$!
p2=`echo $x | cut -d' ' -f2`
echo $p2 echo $p2
instance_slam & instance_slam &
x=`jobs -l | tail -1` p3=$!
p3=`echo $x | cut -d' ' -f2`
echo $p3 echo $p3
instance_slam & instance_slam &
x=`jobs -l | tail -1` p4=$!
p4=`echo $x | cut -d' ' -f2`
echo $p4 echo $p4
instance_slam & instance_slam &
x=`jobs -l | tail -1` p5=$!
p5=`echo $x | cut -d' ' -f2`
echo $p5 echo $p5
ls -lR >/dev/null ls -lR >/dev/null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment