<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/trace, branch v4.12.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.12.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.12.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-07-27T22:10:24Z</updated>
<entry>
<title>tracing: Fix kmemleak in instance_rmdir</title>
<updated>2017-07-27T22:10:24Z</updated>
<author>
<name>Chunyu Hu</name>
<email>chuhu@redhat.com</email>
</author>
<published>2017-07-20T10:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ab78ac460dfbc4c129a10677164abec31deda7f7'/>
<id>urn:sha1:ab78ac460dfbc4c129a10677164abec31deda7f7</id>
<content type='text'>
commit db9108e054700c96322b0f0028546aa4e643cf0b upstream.

Hit the kmemleak when executing instance_rmdir, it forgot releasing
mem of tracing_cpumask. With this fix, the warn does not appear any
more.

unreferenced object 0xffff93a8dfaa7c18 (size 8):
  comm "mkdir", pid 1436, jiffies 4294763622 (age 9134.308s)
  hex dump (first 8 bytes):
    ff ff ff ff ff ff ff ff                          ........
  backtrace:
    [&lt;ffffffff88b6567a&gt;] kmemleak_alloc+0x4a/0xa0
    [&lt;ffffffff8861ea41&gt;] __kmalloc_node+0xf1/0x280
    [&lt;ffffffff88b505d3&gt;] alloc_cpumask_var_node+0x23/0x30
    [&lt;ffffffff88b5060e&gt;] alloc_cpumask_var+0xe/0x10
    [&lt;ffffffff88571ab0&gt;] instance_mkdir+0x90/0x240
    [&lt;ffffffff886e5100&gt;] tracefs_syscall_mkdir+0x40/0x70
    [&lt;ffffffff886565c9&gt;] vfs_mkdir+0x109/0x1b0
    [&lt;ffffffff8865b1d0&gt;] SyS_mkdir+0xd0/0x100
    [&lt;ffffffff88403857&gt;] do_syscall_64+0x67/0x150
    [&lt;ffffffff88b710e7&gt;] return_from_SYSCALL_64+0x0/0x6a
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Link: http://lkml.kernel.org/r/1500546969-12594-1-git-send-email-chuhu@redhat.com

Fixes: ccfe9e42e451 ("tracing: Make tracing_cpumask available for all instances")
Signed-off-by: Chunyu Hu &lt;chuhu@redhat.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ftrace: Fix uninitialized variable in match_records()</title>
<updated>2017-07-27T22:10:17Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-07-12T07:35:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=57c2c7dfa049e5a4ab473b1dee8283f39fc6cafd'/>
<id>urn:sha1:57c2c7dfa049e5a4ab473b1dee8283f39fc6cafd</id>
<content type='text'>
commit 2e028c4fe12907f226b8221815f16c2486ad3aa7 upstream.

My static checker complains that if "func" is NULL then "clear_filter"
is uninitialized.  This seems like it could be true, although it's
possible something subtle is happening that I haven't seen.

    kernel/trace/ftrace.c:3844 match_records()
    error: uninitialized symbol 'clear_filter'.

Link: http://lkml.kernel.org/r/20170712073556.h6tkpjcdzjaozozs@mwanda

Fixes: f0a3b154bd7 ("ftrace: Clarify code for mod command")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tracing/kprobes: Allow to create probe with a module name starting with a digit</title>
<updated>2017-06-30T03:13:23Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2017-06-22T09:24:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9e52b32567126fe146f198971364f68d3bc5233f'/>
<id>urn:sha1:9e52b32567126fe146f198971364f68d3bc5233f</id>
<content type='text'>
Always try to parse an address, since kstrtoul() will safely fail when
given a symbol as input. If that fails (which will be the case for a
symbol), try to parse a symbol instead.

This allows creating a probe such as:

    p:probe/vlan_gro_receive 8021q:vlan_gro_receive+0

Which is necessary for this command to work:

    perf probe -m 8021q -a vlan_gro_receive

Link: http://lkml.kernel.org/r/fd72d666f45b114e2c5b9cf7e27b91de1ec966f1.1498122881.git.sd@queasysnail.net

Cc: stable@vger.kernel.org
Fixes: 413d37d1e ("tracing: Add kprobe-based event tracer")
Acked-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Fix regression with module command in stack_trace_filter</title>
<updated>2017-06-29T14:05:45Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-06-29T14:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0f17976568b3f72e676450af0c0db6f8752253d6'/>
<id>urn:sha1:0f17976568b3f72e676450af0c0db6f8752253d6</id>
<content type='text'>
When doing the following command:

 # echo ":mod:kvm_intel" &gt; /sys/kernel/tracing/stack_trace_filter

it triggered a crash.

This happened with the clean up of probes. It required all callers to the
regex function (doing ftrace filtering) to have ops-&gt;private be a pointer to
a trace_array. But for the stack tracer, that is not the case.

Allow for the ops-&gt;private to be NULL, and change the function command
callbacks to handle the trace_array pointer being NULL as well.

Fixes: d2afd57a4b96 ("tracing/ftrace: Allow instances to have their own function probes")
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Fix memory leak in ftrace_graph_release()</title>
<updated>2017-05-27T02:35:48Z</updated>
<author>
<name>Luis Henriques</name>
<email>lhenriques@suse.com</email>
</author>
<published>2017-05-25T15:20:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f9797c2f20c0160edd718aa467101f3301e57e59'/>
<id>urn:sha1:f9797c2f20c0160edd718aa467101f3301e57e59</id>
<content type='text'>
ftrace_hash is being kfree'ed in ftrace_graph_release(), however the
-&gt;buckets field is not.  This results in a memory leak that is easily
captured by kmemleak:

unreferenced object 0xffff880038afe000 (size 8192):
  comm "trace-cmd", pid 238, jiffies 4294916898 (age 9.736s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff815f561e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff8113964d&gt;] __kmalloc+0x12d/0x1a0
    [&lt;ffffffff810bf6d1&gt;] alloc_ftrace_hash+0x51/0x80
    [&lt;ffffffff810c0523&gt;] __ftrace_graph_open.isra.39.constprop.46+0xa3/0x100
    [&lt;ffffffff810c05e8&gt;] ftrace_graph_open+0x68/0xa0
    [&lt;ffffffff8114003d&gt;] do_dentry_open.isra.1+0x1bd/0x2d0
    [&lt;ffffffff81140df7&gt;] vfs_open+0x47/0x60
    [&lt;ffffffff81150f95&gt;] path_openat+0x2a5/0x1020
    [&lt;ffffffff81152d6a&gt;] do_filp_open+0x8a/0xf0
    [&lt;ffffffff811411df&gt;] do_sys_open+0x12f/0x200
    [&lt;ffffffff811412ce&gt;] SyS_open+0x1e/0x20
    [&lt;ffffffff815fa6e0&gt;] entry_SYSCALL_64_fastpath+0x13/0x94
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Link: http://lkml.kernel.org/r/20170525152038.7661-1-lhenriques@suse.com

Cc: stable@vger.kernel.org
Fixes: b9b0c831bed2 ("ftrace: Convert graph filter to use hash tables")
Signed-off-by: Luis Henriques &lt;lhenriques@suse.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'trace-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace</title>
<updated>2017-05-21T06:39:03Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-05-21T06:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=56f410cf45a1c1f68f77741990e0435b06a07676'/>
<id>urn:sha1:56f410cf45a1c1f68f77741990e0435b06a07676</id>
<content type='text'>
Pull tracing fixes from Steven Rostedt:

 - Fix a bug caused by not cleaning up the new instance unique triggers
   when deleting an instance. It also creates a selftest that triggers
   that bug.

 - Fix the delayed optimization happening after kprobes boot up self
   tests being removed by freeing of init memory.

 - Comment kprobes on why the delay optimization is not a problem for
   removal of modules, to keep other developers from searching that
   riddle.

 - Fix another case of rcu not watching in stack trace tracing.

* tag 'trace-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Make sure RCU is watching before calling a stack trace
  kprobes: Document how optimized kprobes are removed from module unload
  selftests/ftrace: Add test to remove instance with active event triggers
  selftests/ftrace: Fix bashisms
  ftrace: Remove #ifdef from code and add clear_ftrace_function_probes() stub
  ftrace/instances: Clear function triggers when removing instances
  ftrace: Simplify glob handling in unregister_ftrace_function_probe_func()
  tracing/kprobes: Enforce kprobes teardown after testing
  tracing: Move postpone selftests to core from early_initcall
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2017-05-20T23:12:30Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-05-20T23:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=894e21642dde19184f059c485c49abd7ecdd6ec9'/>
<id>urn:sha1:894e21642dde19184f059c485c49abd7ecdd6ec9</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "A small collection of fixes that should go into this cycle.

   - a pull request from Christoph for NVMe, which ended up being
     manually applied to avoid pulling in newer bits in master. Mostly
     fibre channel fixes from James, but also a few fixes from Jon and
     Vijay

   - a pull request from Konrad, with just a single fix for xen-blkback
     from Gustavo.

   - a fuseblk bdi fix from Jan, fixing a regression in this series with
     the dynamic backing devices.

   - a blktrace fix from Shaohua, replacing sscanf() with kstrtoull().

   - a request leak fix for drbd from Lars, fixing a regression in the
     last series with the kref changes. This will go to stable as well"

* 'for-linus' of git://git.kernel.dk/linux-block:
  nvmet: release the sq ref on rdma read errors
  nvmet-fc: remove target cpu scheduling flag
  nvme-fc: stop queues on error detection
  nvme-fc: require target or discovery role for fc-nvme targets
  nvme-fc: correct port role bits
  nvme: unmap CMB and remove sysfs file in reset path
  blktrace: fix integer parse
  fuseblk: Fix warning in super_setup_bdi_name()
  block: xen-blkback: add null check to avoid null pointer dereference
  drbd: fix request leak introduced by locking/atomic, kref: Kill kref_sub()
</content>
</entry>
<entry>
<title>blktrace: fix integer parse</title>
<updated>2017-05-19T15:21:15Z</updated>
<author>
<name>Shaohua Li</name>
<email>shli@fb.com</email>
</author>
<published>2017-05-19T15:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5f3394530fbe90d3bcd1c204618960bc50236578'/>
<id>urn:sha1:5f3394530fbe90d3bcd1c204618960bc50236578</id>
<content type='text'>
sscanf is a very poor way to parse integer. For example, I input
"discard" for act_mask, it gets 0xd and completely messes up. Using
correct API to do integer parse.

This patch also makes attributes accept any base of integer.

Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>tracing: Make sure RCU is watching before calling a stack trace</title>
<updated>2017-05-19T03:57:56Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-05-12T17:15:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a33d7d94eed92b23fbbc7b0de06a41b2bbaa49e3'/>
<id>urn:sha1:a33d7d94eed92b23fbbc7b0de06a41b2bbaa49e3</id>
<content type='text'>
As stack tracing now requires "rcu watching", force RCU to be watching when
recording a stack trace.

Link: http://lkml.kernel.org/r/20170512172449.879684501@goodmis.org

Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Remove #ifdef from code and add clear_ftrace_function_probes() stub</title>
<updated>2017-05-18T01:53:32Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-05-18T01:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8a49f3e03c8ac52fe1b706fffb13142295fa0c47'/>
<id>urn:sha1:8a49f3e03c8ac52fe1b706fffb13142295fa0c47</id>
<content type='text'>
No need to add ugly #ifdefs in the code. Having a standard stub file is much
prettier.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
