<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_probe.c, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-23T03:52:30Z</updated>
<entry>
<title>tracing: Use the return of str_has_prefix() to remove open coded numbers</title>
<updated>2018-12-23T03:52:30Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-12-22T04:10:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d739c1f6156c70eb0548aa288dcfbac9e0bd162'/>
<id>urn:sha1:3d739c1f6156c70eb0548aa288dcfbac9e0bd162</id>
<content type='text'>
There are several locations that compare constants to the beginning of
string variables to determine what commands should be done, then the
constant length is used to index into the string. This is error prone as the
hard coded numbers have to match the size of the constants. Instead, use the
len returned from str_has_prefix() and remove the open coded string length
sizes.

Cc: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Masami  Hiramatsu &lt;mhiramat@kernel.org&gt; (for trace_probe part)
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Use str_has_prefix() instead of using fixed sizes</title>
<updated>2018-12-23T03:51:54Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-12-20T18:20:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6b2735514bcd70ad1556a33892a636b20ece671'/>
<id>urn:sha1:b6b2735514bcd70ad1556a33892a636b20ece671</id>
<content type='text'>
There are several instances of strncmp(str, "const", 123), where 123 is the
strlen of the const string to check if "const" is the prefix of str. But
this can be error prone. Use str_has_prefix() instead.

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/kprobes: Use dyn_event framework for kprobe events</title>
<updated>2018-12-09T01:54:09Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2018-11-05T09:02:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6212dd29683eec51d6d05374a66ac953e81250e9'/>
<id>urn:sha1:6212dd29683eec51d6d05374a66ac953e81250e9</id>
<content type='text'>
Use dyn_event framework for kprobe events. This shows
kprobe events on "tracing/dynamic_events" file.

User can also define new events via tracing/dynamic_events.

Link: http://lkml.kernel.org/r/154140855646.17322.6619219995865980392.stgit@devbox

Reviewed-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Tested-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Integrate similar probe argument parsers</title>
<updated>2018-12-09T01:54:09Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2018-11-05T09:01:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d00bbea9456f35fb34310d454e561f05d68d07fe'/>
<id>urn:sha1:d00bbea9456f35fb34310d454e561f05d68d07fe</id>
<content type='text'>
Integrate similar argument parsers for kprobes and uprobes events
into traceprobe_parse_probe_arg().

Link: http://lkml.kernel.org/r/154140850016.17322.9836787731210512176.stgit@devbox

Reviewed-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Tested-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/kprobes: Fix strpbrk() argument order</title>
<updated>2018-11-05T14:47:14Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2018-11-01T14:29:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee474b81fe5aa5dc0faae920bf66240fbf55f891'/>
<id>urn:sha1:ee474b81fe5aa5dc0faae920bf66240fbf55f891</id>
<content type='text'>
Fix strpbrk()'s argument order, it must pass acceptable string
in 2nd argument. Note that this can cause a kernel panic where
it recovers backup character to code-&gt;data.

Link: http://lkml.kernel.org/r/154108256792.2604.1816052586385217811.stgit@devbox

Fixes: a6682814f371 ("tracing/kprobes: Allow kprobe-events to record module symbol")
Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: probeevent: Fix uninitialized used of offset in parse args</title>
<updated>2018-10-12T16:50:22Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-10-12T16:50:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf173ca92da97863e1579a982d500da98f2e7a3f'/>
<id>urn:sha1:bf173ca92da97863e1579a982d500da98f2e7a3f</id>
<content type='text'>
Dan's smatch utility found an uninitialized use of offset in a path in
parse_probe_args(). Unless an offset is specifically specified for commands
that allow them, it should default to zero.

Link: http://lkml.kernel.org/r/20181012134246.5doqaobxunlqqs53@mwanda
Fixes: 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt; (smatch)
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/kprobes: Allow kprobe-events to record module symbol</title>
<updated>2018-10-11T02:19:12Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2018-08-28T16:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6682814f37124ec1e708cca8f44968445fa9dd7'/>
<id>urn:sha1:a6682814f37124ec1e708cca8f44968445fa9dd7</id>
<content type='text'>
Allow kprobe-events to record module symbols.

Since data symbols in a non-loaded module doesn't exist, it fails to
define such symbol as an argument of kprobe-event. But if the kprobe
event is defined on that module, we can defer to resolve the symbol
address.

Note that if given symbol is not found, the event is kept unavailable.
User can enable it but the event is not recorded.

Link: http://lkml.kernel.org/r/153547312336.26502.11432902826345374463.stgit@devbox

Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: probeevent: Add $argN for accessing function args</title>
<updated>2018-10-11T02:19:11Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2018-04-25T12:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1303af5d79eb13a658633a9fb0ce3aed0f7decf'/>
<id>urn:sha1:a1303af5d79eb13a658633a9fb0ce3aed0f7decf</id>
<content type='text'>
Add $argN special fetch variable for accessing function
arguments. This allows user to trace the Nth argument easily
at the function entry.

Note that this returns most probably assignment of registers
and stacks. In some case, it may not work well. If you need
to access correct registers or stacks you should use perf-probe.

Link: http://lkml.kernel.org/r/152465888632.26224.3412465701570253696.stgit@devbox

Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: probeevent: Add array type support</title>
<updated>2018-10-11T02:19:10Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2018-04-25T12:21:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40b53b771806b1770837169cd32d1bf167fbccaf'/>
<id>urn:sha1:40b53b771806b1770837169cd32d1bf167fbccaf</id>
<content type='text'>
Add array type support for probe events.
This allows user to get arraied types from memory address.
The array type syntax is

	TYPE[N]

Where TYPE is one of types (u8/16/32/64,s8/16/32/64,
x8/16/32/64, symbol, string) and N is a fixed value less
than 64.

The string array type is a bit different from other types. For
other base types, &lt;base-type&gt;[1] is equal to &lt;base-type&gt;
(e.g. +0(%di):x32[1] is same as +0(%di):x32.) But string[1] is not
equal to string. The string type itself represents "char array",
but string array type represents "char * array". So, for example,
+0(%di):string[1] is equal to +0(+0(%di)):string.

Link: http://lkml.kernel.org/r/152465891533.26224.6150658225601339931.stgit@devbox

Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: probeevent: Add symbol type</title>
<updated>2018-10-11T02:19:10Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2018-04-25T12:20:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=60c2e0cebfd01bd1bc5e8843f063264148d6b2bb'/>
<id>urn:sha1:60c2e0cebfd01bd1bc5e8843f063264148d6b2bb</id>
<content type='text'>
Add "symbol" type to probeevent, which is an alias of u32 or u64
(depends on BITS_PER_LONG). This shows the result value in
symbol+offset style. This type is only available with kprobe
events.

Link: http://lkml.kernel.org/r/152465882860.26224.14779072294412467338.stgit@devbox

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