<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace, branch v3.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/trace?h=v3.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/trace?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-04-18T16:00:26Z</updated>
<entry>
<title>Revert "block: add missing block_bio_complete() tracepoint"</title>
<updated>2013-04-18T16:00:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-04-18T16:00:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a82a8d132b26d438eb90b3ab35a7016e7227a1d'/>
<id>urn:sha1:0a82a8d132b26d438eb90b3ab35a7016e7227a1d</id>
<content type='text'>
This reverts commit 3a366e614d0837d9fc23f78cdb1a1186ebc3387f.

Wanlong Gao reports that it causes a kernel panic on his machine several
minutes after boot. Reverting it removes the panic.

Jens says:
 "It's not quite clear why that is yet, so I think we should just revert
  the commit for 3.9 final (which I'm assuming is pretty close).

  The wifi is crap at the LSF hotel, so sending this email instead of
  queueing up a revert and pull request."

Reported-by: Wanlong Gao &lt;gaowanlong@cn.fujitsu.com&gt;
Requested-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2013-04-14T18:10:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-04-14T18:10:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae9f4939bad09767c0532f76ccc48cec0ff3ea4e'/>
<id>urn:sha1:ae9f4939bad09767c0532f76ccc48cec0ff3ea4e</id>
<content type='text'>
Pull perf fixes from Ingo Molnar:
 "Misc fixlets"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix error return code
  ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
  perf: Fix strncpy() use, use strlcpy() instead of strncpy()
  perf: Fix strncpy() use, always make sure it's NUL terminated
  perf: Fix ring_buffer perf_output_space() boundary calculation
  perf/x86: Fix uninitialized pt_regs in intel_pmu_drain_bts_buffer()
</content>
</entry>
<entry>
<title>ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section</title>
<updated>2013-04-12T21:12:41Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-04-12T20:40:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7f49ef69db6bbf756c0abca7e9b65b32e999eec8'/>
<id>urn:sha1:7f49ef69db6bbf756c0abca7e9b65b32e999eec8</id>
<content type='text'>
As ftrace_filter_lseek is now used with ftrace_pid_fops, it needs to
be moved out of the #ifdef CONFIG_DYNAMIC_FTRACE section as the
ftrace_pid_fops is defined when DYNAMIC_FTRACE is not.

Cc: stable@vger.kernel.org
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix possible NULL pointer dereferences</title>
<updated>2013-04-12T18:43:34Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-04-11T06:55:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a76f8c0ab19f215af2a3442870eeb5f0e81998d'/>
<id>urn:sha1:6a76f8c0ab19f215af2a3442870eeb5f0e81998d</id>
<content type='text'>
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops.  However seq_open() is called only for FMODE_READ in
the fops-&gt;open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic.

It can be easily reproduced with following command:

  $ cd /sys/kernel/debug/tracing
  $ echo 1234 | sudo tee -a set_ftrace_pid

In this example, GNU coreutils' tee opens the file with fopen(, "a")
and then the fopen() internally calls lseek().

Link: http://lkml.kernel.org/r/1365663302-2170-1-git-send-email-namhyung@kernel.org

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix double free when function profile init failed</title>
<updated>2013-04-09T22:54:04Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-04-01T12:46:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=83e03b3fe4daffdebbb42151d5410d730ae50bd1'/>
<id>urn:sha1:83e03b3fe4daffdebbb42151d5410d730ae50bd1</id>
<content type='text'>
On the failure path, stat-&gt;start and stat-&gt;pages will refer same page.
So it'll attempt to free the same page again and get kernel panic.

Link: http://lkml.kernel.org/r/1364820385-32027-1-git-send-email-namhyung@kernel.org

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Do not call stub functions in control loop</title>
<updated>2013-04-08T16:24:23Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-27T13:31:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=395b97a3aeff0b8d949ee3e67bf8c11c5ffd6861'/>
<id>urn:sha1:395b97a3aeff0b8d949ee3e67bf8c11c5ffd6861</id>
<content type='text'>
The function tracing control loop used by perf spits out a warning
if the called function is not a control function. This is because
the control function references a per cpu allocated data structure
on struct ftrace_ops that is not allocated for other types of
functions.

commit 0a016409e42 "ftrace: Optimize the function tracer list loop"

Had an optimization done to all function tracing loops to optimize
for a single registered ops. Unfortunately, this allows for a slight
race when tracing starts or ends, where the stub function might be
called after the current registered ops is removed. In this case we
get the following dump:

root# perf stat -e ftrace:function sleep 1
[   74.339105] WARNING: at include/linux/ftrace.h:209 ftrace_ops_control_func+0xde/0xf0()
[   74.349522] Hardware name: PRIMERGY RX200 S6
[   74.357149] Modules linked in: sg igb iTCO_wdt ptp pps_core iTCO_vendor_support i7core_edac dca lpc_ich i2c_i801 coretemp edac_core crc32c_intel mfd_core ghash_clmulni_intel dm_multipath acpi_power_meter pcspk
r microcode vhost_net tun macvtap macvlan nfsd kvm_intel kvm auth_rpcgss nfs_acl lockd sunrpc uinput xfs libcrc32c sd_mod crc_t10dif sr_mod cdrom mgag200 i2c_algo_bit drm_kms_helper ttm qla2xxx mptsas ahci drm li
bahci scsi_transport_sas mptscsih libata scsi_transport_fc i2c_core mptbase scsi_tgt dm_mirror dm_region_hash dm_log dm_mod
[   74.446233] Pid: 1377, comm: perf Tainted: G        W    3.9.0-rc1 #1
[   74.453458] Call Trace:
[   74.456233]  [&lt;ffffffff81062e3f&gt;] warn_slowpath_common+0x7f/0xc0
[   74.462997]  [&lt;ffffffff810fbc60&gt;] ? rcu_note_context_switch+0xa0/0xa0
[   74.470272]  [&lt;ffffffff811041a2&gt;] ? __unregister_ftrace_function+0xa2/0x1a0
[   74.478117]  [&lt;ffffffff81062e9a&gt;] warn_slowpath_null+0x1a/0x20
[   74.484681]  [&lt;ffffffff81102ede&gt;] ftrace_ops_control_func+0xde/0xf0
[   74.491760]  [&lt;ffffffff8162f400&gt;] ftrace_call+0x5/0x2f
[   74.497511]  [&lt;ffffffff8162f400&gt;] ? ftrace_call+0x5/0x2f
[   74.503486]  [&lt;ffffffff8162f400&gt;] ? ftrace_call+0x5/0x2f
[   74.509500]  [&lt;ffffffff810fbc65&gt;] ? synchronize_sched+0x5/0x50
[   74.516088]  [&lt;ffffffff816254d5&gt;] ? _cond_resched+0x5/0x40
[   74.522268]  [&lt;ffffffff810fbc65&gt;] ? synchronize_sched+0x5/0x50
[   74.528837]  [&lt;ffffffff811041a2&gt;] ? __unregister_ftrace_function+0xa2/0x1a0
[   74.536696]  [&lt;ffffffff816254d5&gt;] ? _cond_resched+0x5/0x40
[   74.542878]  [&lt;ffffffff8162402d&gt;] ? mutex_lock+0x1d/0x50
[   74.548869]  [&lt;ffffffff81105c67&gt;] unregister_ftrace_function+0x27/0x50
[   74.556243]  [&lt;ffffffff8111eadf&gt;] perf_ftrace_event_register+0x9f/0x140
[   74.563709]  [&lt;ffffffff816254d5&gt;] ? _cond_resched+0x5/0x40
[   74.569887]  [&lt;ffffffff8162402d&gt;] ? mutex_lock+0x1d/0x50
[   74.575898]  [&lt;ffffffff8111e94e&gt;] perf_trace_destroy+0x2e/0x50
[   74.582505]  [&lt;ffffffff81127ba9&gt;] tp_perf_event_destroy+0x9/0x10
[   74.589298]  [&lt;ffffffff811295d0&gt;] free_event+0x70/0x1a0
[   74.595208]  [&lt;ffffffff8112a579&gt;] perf_event_release_kernel+0x69/0xa0
[   74.602460]  [&lt;ffffffff816254d5&gt;] ? _cond_resched+0x5/0x40
[   74.608667]  [&lt;ffffffff8112a640&gt;] put_event+0x90/0xc0
[   74.614373]  [&lt;ffffffff8112a740&gt;] perf_release+0x10/0x20
[   74.620367]  [&lt;ffffffff811a3044&gt;] __fput+0xf4/0x280
[   74.625894]  [&lt;ffffffff811a31de&gt;] ____fput+0xe/0x10
[   74.631387]  [&lt;ffffffff81083697&gt;] task_work_run+0xa7/0xe0
[   74.637452]  [&lt;ffffffff81014981&gt;] do_notify_resume+0x71/0xb0
[   74.643843]  [&lt;ffffffff8162fa92&gt;] int_signal+0x12/0x17

To fix this a new ftrace_ops flag is added that denotes the ftrace_list_end
ftrace_ops stub as just that, a stub. This flag is now checked in the
control loop and the function is not called if the flag is set.

Thanks to Jovi for not just reporting the bug, but also pointing out
where the bug was in the code.

Link: http://lkml.kernel.org/r/514A8855.7090402@redhat.com
Link: http://lkml.kernel.org/r/1364377499-1900-15-git-send-email-jovi.zhangwei@huawei.com

Tested-by: WANG Chao &lt;chaowang@redhat.com&gt;
Reported-by: WANG Chao &lt;chaowang@redhat.com&gt;
Reported-by: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Consistently restore trace function on sysctl enabling</title>
<updated>2013-04-08T16:24:22Z</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2013-03-26T16:53:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5000c418840b309251c5887f0b56503aae30f84c'/>
<id>urn:sha1:5000c418840b309251c5887f0b56503aae30f84c</id>
<content type='text'>
If we reenable ftrace via syctl, we currently set ftrace_trace_function
based on the previous simplistic algorithm. This is inconsistent with
what update_ftrace_function does. So better call that helper instead.

Link: http://lkml.kernel.org/r/5151D26F.1070702@siemens.com

Cc: stable@vger.kernel.org
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix race with update_max_tr_single and changing tracers</title>
<updated>2013-04-08T16:24:22Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-26T21:33:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2930e04d00e113ae24bb2b7c2b58de7b648a62c7'/>
<id>urn:sha1:2930e04d00e113ae24bb2b7c2b58de7b648a62c7</id>
<content type='text'>
The commit 34600f0e9 "tracing: Fix race with max_tr and changing tracers"
fixed the updating of the main buffers with the race of changing
tracers, but left out the fix to the updating of just a per cpu buffer.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()</title>
<updated>2013-04-08T11:26:56Z</updated>
<author>
<name>Chen Gang</name>
<email>gang.chen@asianux.com</email>
</author>
<published>2013-04-08T04:12:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=75761cc15877c155b3849b4e0e0cb3f897faf471'/>
<id>urn:sha1:75761cc15877c155b3849b4e0e0cb3f897faf471</id>
<content type='text'>
For NUL terminated string we always need to set '\0' at the end.

Signed-off-by: Chen Gang &lt;gang.chen@asianux.com&gt;
Cc: rostedt@goodmis.org
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Link: http://lkml.kernel.org/r/516243B7.9020405@asianux.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf: Fix strncpy() use, use strlcpy() instead of strncpy()</title>
<updated>2013-04-08T11:26:56Z</updated>
<author>
<name>Chen Gang</name>
<email>gang.chen@asianux.com</email>
</author>
<published>2013-04-08T04:06:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=67012ab1d2ce871afea4ee55408f233f97d09d07'/>
<id>urn:sha1:67012ab1d2ce871afea4ee55408f233f97d09d07</id>
<content type='text'>
For NUL terminated string we always need to set '\0' at the end.

Signed-off-by: Chen Gang &lt;gang.chen@asianux.com&gt;
Cc: rostedt@goodmis.org
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Link: http://lkml.kernel.org/r/51624254.30301@asianux.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
