<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace, branch v2.6.30-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/trace?h=v2.6.30-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/trace?h=v2.6.30-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2009-04-12T09:59:29Z</updated>
<entry>
<title>tracing/filters: return proper error code when writing filter file</title>
<updated>2009-04-12T09:59:29Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-04-11T07:55:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=44e9c8b7adc52079f0535f9de0c2c2477831389b'/>
<id>urn:sha1:44e9c8b7adc52079f0535f9de0c2c2477831389b</id>
<content type='text'>
- propagate return value of filter_add_pred() to the user

- return -ENOSPC but not -ENOMEM or -EINVAL when the filter array
  is full

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;49E04CF0.3010105@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing/filters: allow user input integer to be oct or hex</title>
<updated>2009-04-12T09:59:28Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-04-11T07:52:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a3e0ab050774117d4a6173087c8bf3888662a83f'/>
<id>urn:sha1:a3e0ab050774117d4a6173087c8bf3888662a83f</id>
<content type='text'>
Before patch:

 # echo 'parent_pid == 0x10' &gt; events/sched/sched_process_fork/filter
 # cat sched/sched_process_fork/filter
 parent_pid == 0

After patch:

 # cat sched/sched_process_fork/filter
 parent_pid == 16

Also check the input more strictly.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;49E04C53.4010600@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing/filters: fix NULL pointer dereference</title>
<updated>2009-04-12T09:59:28Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-04-11T07:52:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bcabd91c271e50eebc0cb9220ac92700332b452e'/>
<id>urn:sha1:bcabd91c271e50eebc0cb9220ac92700332b452e</id>
<content type='text'>
Try this, and you'll see NULL pointer dereference bug:

  # echo -n 'parent_comm ==' &gt; sched/sched_process_fork/filter

Because we passed NULL ptr to simple_strtoull().

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;49E04C43.1050504@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing/filters: NIL-terminate user input filter</title>
<updated>2009-04-12T09:59:27Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-04-11T07:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8433a40eb7f2c4883ad57f9900f63e4d59240eb7'/>
<id>urn:sha1:8433a40eb7f2c4883ad57f9900f63e4d59240eb7</id>
<content type='text'>
Make sure messages from user space are NIL-terminated strings,
otherwise we could dump random memory while reading filter file.

Try this:
 # echo 'parent_comm ==' &gt; events/sched/sched_process_fork/filter
 # cat events/sched/sched_process_fork/filter
 parent_comm == �

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;49E04C32.6060508@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>ftrace: Output REC-&gt;var instead of __entry-&gt;var for trace format</title>
<updated>2009-04-10T13:48:53Z</updated>
<author>
<name>Zhaolei</name>
<email>zhaolei@cn.fujitsu.com</email>
</author>
<published>2009-04-08T09:00:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0462b5664b2bda5a18fef7efb5bb32ce36590c1a'/>
<id>urn:sha1:0462b5664b2bda5a18fef7efb5bb32ce36590c1a</id>
<content type='text'>
print fmt: "irq=%d return=%s", __entry-&gt;irq, __entry-&gt;ret ? \"handled\" : \"unhandled\"

"__entry" should be convert to "REC" by __stringify() macro.

Signed-off-by: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;49DC679D.2090901@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: fix document references</title>
<updated>2009-04-10T11:08:50Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-04-10T00:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4d1f4372dbea068ba4ee3d98231133a4a4ee15bd'/>
<id>urn:sha1:4d1f4372dbea068ba4ee3d98231133a4a4ee15bd</id>
<content type='text'>
When moving documents to Documentation/trace/, I forgot to
grep Kconfig to find out those references.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Cc: Pekka Paalanen &lt;pq@iki.fi&gt;
Cc: eduard.munteanu@linux360.ro
LKML-Reference: &lt;49DE97EF.7080208@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: fix splice return too large</title>
<updated>2009-04-10T10:44:46Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2009-04-02T07:17:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93cfb3c9fd83d877a8f1ffad9ff862b617b32828'/>
<id>urn:sha1:93cfb3c9fd83d877a8f1ffad9ff862b617b32828</id>
<content type='text'>
I got these from strace:

 splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 12288
 splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 12288
 splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 12288
 splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 16384
 splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 8192
 splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 8192
 splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 8192

I wanted to splice_read 4096 bytes, but it returns 8192 or larger.

It is because the return value of tracing_buffers_splice_read()
does not include "zero out any left over data" bytes.

But tracing_buffers_read() includes these bytes, we make them
consistent.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;srostedt@redhat.com&gt;
LKML-Reference: &lt;49D46674.9030804@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: update file-&gt;f_pos when splice(2) it</title>
<updated>2009-04-10T10:44:44Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2009-04-02T07:17:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7625a555f55d7ae49236cde551786c88f5a5ce1'/>
<id>urn:sha1:c7625a555f55d7ae49236cde551786c88f5a5ce1</id>
<content type='text'>
Impact: Cleanup

These two lines:

	if (unlikely(*ppos))
		return -ESPIPE;

in tracing_buffers_splice_read() are not needed, VFS layer
has disabled seek(2).

We remove these two lines, and then we can update file-&gt;f_pos.

And tracing_buffers_read() updates file-&gt;f_pos, this fix
make tracing_buffers_splice_read() updates file-&gt;f_pos too.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;srostedt@redhat.com&gt;
LKML-Reference: &lt;49D46670.4010503@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: allocate page when needed</title>
<updated>2009-04-10T10:44:43Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2009-04-02T07:16:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ddd538f3e6a1a4bec2f6942f83a753263e6577b4'/>
<id>urn:sha1:ddd538f3e6a1a4bec2f6942f83a753263e6577b4</id>
<content type='text'>
Impact: Cleanup

Sometimes, we open trace_pipe_raw, but we don't read(2) it,
we just splice(2) it, thus, the page is not used.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;srostedt@redhat.com&gt;
LKML-Reference: &lt;49D4666B.4010608@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: disable seeking for trace_pipe_raw</title>
<updated>2009-04-10T10:44:42Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2009-04-02T07:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d1e7e02f30be672c6f6ee40908be83877a0d49d1'/>
<id>urn:sha1:d1e7e02f30be672c6f6ee40908be83877a0d49d1</id>
<content type='text'>
Impact: disable pread()

We set tracing_buffers_fops.llseek to no_llseek,
but we can still perform pread() to read this file.

That is not expected.

This fix uses nonseekable_open() to disable it.

tracing_buffers_fops.llseek is still set to no_llseek,
it mark this file is a "non-seekable device" and is used by
sys_splice(). See also do_splice() or manual of splice(2):

ERRORS
       EINVAL Target file system doesn't support  splicing;
              neither  of the descriptors refers to a pipe;
              or offset given for non-seekable device.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;srostedt@redhat.com&gt;
LKML-Reference: &lt;49D46668.8030806@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
