<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/ftrace.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-07-17T13:45:08Z</updated>
<entry>
<title>ftrace/x86: Add call to ftrace_graph_is_dead() in function graph code</title>
<updated>2014-07-17T13:45:08Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
</author>
<published>2014-06-25T14:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84b2bc7fa005b99a06979673225dc2bb7de3fd91'/>
<id>urn:sha1:84b2bc7fa005b99a06979673225dc2bb7de3fd91</id>
<content type='text'>
ftrace_stop() is going away as it disables parts of function tracing
that affects users that should not be affected. But ftrace_graph_stop()
is built on ftrace_stop(). Here's another example of killing all of
function tracing because something went wrong with function graph
tracing.

Instead of disabling all users of function tracing on function graph
error, disable only function graph tracing. To do this, the arch code
must call ftrace_graph_is_dead() before it implements function graph.

Link: http://lkml.kernel.org/r/53C54D18.3020602@zytor.com

Acked-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Reviewed-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/x86: Call text_ip_addr() instead of the duplicated code</title>
<updated>2014-06-03T23:44:37Z</updated>
<author>
<name>Petr Mladek</name>
</author>
<published>2014-06-03T16:23:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=964f7b6b785651a75ef1cbad43a393ca52d4b4f7'/>
<id>urn:sha1:964f7b6b785651a75ef1cbad43a393ca52d4b4f7</id>
<content type='text'>
I just went over this when looking at some Xen-related ftrace initialization
problems. They were related to Xen code that is not upstream but this clean up
would make sense here.

I think that this was already the intention when text_ip_addr() was introduced
in the commit 87fbb2ac6073a703930 (ftrace/x86: Use breakpoints for converting
function graph caller). Anyway, better do it now before it shots people into
their leg ;-)

Link: http://lkml.kernel.org/p/1401812601-2359-1-git-send-email-pmladek@suse.cz

Signed-off-by: Petr Mladek &lt;pmladek@suse.cz&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Remove FTRACE_UPDATE_MODIFY_CALL_REGS flag</title>
<updated>2014-05-14T15:37:30Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
</author>
<published>2014-05-07T20:09:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1b2f2bd5821c6ab7feed2e133343dd54b212ed9'/>
<id>urn:sha1:f1b2f2bd5821c6ab7feed2e133343dd54b212ed9</id>
<content type='text'>
As the decision to what needs to be done (converting a call to the
ftrace_caller to ftrace_caller_regs or to convert from ftrace_caller_regs
to ftrace_caller) can easily be determined from the rec-&gt;flags of
FTRACE_FL_REGS and FTRACE_FL_REGS_EN, there's no need to have the
ftrace_check_record() return either a UPDATE_MODIFY_CALL_REGS or a
UPDATE_MODIFY_CALL. Just he latter is enough. This added flag causes
more complexity than is required. Remove it.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Make get_ftrace_addr() and get_ftrace_addr_old() global</title>
<updated>2014-05-14T15:37:29Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
</author>
<published>2014-05-07T01:34:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7413af1fb70e7efa6dbc7f27663e7a5126b3aa33'/>
<id>urn:sha1:7413af1fb70e7efa6dbc7f27663e7a5126b3aa33</id>
<content type='text'>
Move and rename get_ftrace_addr() and get_ftrace_addr_old() to
ftrace_get_addr_new() and ftrace_get_addr_curr() respectively.

This moves these two helper functions in the generic code out from
the arch specific code, and renames them to have a better generic
name. This will allow other archs to use them as well as makes it
a bit easier to work on getting separate trampolines for different
functions.

ftrace_get_addr_new() returns the trampoline address that the mcount
call address will be converted to.

ftrace_get_addr_curr() returns the trampoline address of what the
mcount call address currently jumps to.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/x86: Get the current mcount addr for add_breakpoint()</title>
<updated>2014-05-14T15:37:28Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
</author>
<published>2014-05-06T20:26:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94792ea07ce2cceef48803c4df3cb5efacb21c9a'/>
<id>urn:sha1:94792ea07ce2cceef48803c4df3cb5efacb21c9a</id>
<content type='text'>
The add_breakpoint() code in the ftrace updating gets the address
of what the call will become, but if the mcount address is changing
from regs to non-regs ftrace_caller or vice versa, it will use what
the record currently is.

This is rather silly as the code should always use what is currently
there regardless of if it's changing the regs function or just converting
to a nop.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/x86: Fix order of warning messages when ftrace modifies code</title>
<updated>2014-04-21T18:00:35Z</updated>
<author>
<name>Petr Mladek</name>
</author>
<published>2014-02-17T15:22:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74bb8c450459c35ea48806b582b634bbbb9ebb09'/>
<id>urn:sha1:74bb8c450459c35ea48806b582b634bbbb9ebb09</id>
<content type='text'>
The colon at the end of the printk message suggests that it should get printed
before the details printed by ftrace_bug().

When touching the line, let's use the preferred pr_warn() macro as suggested
by checkpatch.pl.

Link: http://lkml.kernel.org/r/1392650573-3390-5-git-send-email-pmladek@suse.cz

Signed-off-by: Petr Mladek &lt;pmladek@suse.cz&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/x86: BUG when ftrace recovery fails</title>
<updated>2014-03-07T15:06:16Z</updated>
<author>
<name>Petr Mladek</name>
</author>
<published>2014-02-24T16:12:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f11f5ecf4ae09815dc2de267c5e04d1de01d862'/>
<id>urn:sha1:7f11f5ecf4ae09815dc2de267c5e04d1de01d862</id>
<content type='text'>
Ftrace modifies function calls using Int3 breakpoints on x86.
The breakpoints are handled only when the patching is in progress.
If something goes wrong, there is a recovery code that removes
the breakpoints. If this fails, the system might get silently
rebooted when a remaining break is not handled or an invalid
instruction is proceed.

We should BUG() when the breakpoint could not be removed. Otherwise,
the system silently crashes when the function finishes the Int3
handler is disabled.

Note that we need to modify remove_breakpoint() to return non-zero
value only when there is an error. The return value was ignored before,
so it does not cause any troubles.

Link: http://lkml.kernel.org/r/1393258342-29978-4-git-send-email-pmladek@suse.cz

Signed-off-by: Petr Mladek &lt;pmladek@suse.cz&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Do not pass data to ftrace_dyn_arch_init</title>
<updated>2014-03-07T15:06:14Z</updated>
<author>
<name>Jiri Slaby</name>
</author>
<published>2014-02-24T18:59:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a36cb11ca65cd6804972eaf1000378ba4384ea7'/>
<id>urn:sha1:3a36cb11ca65cd6804972eaf1000378ba4384ea7</id>
<content type='text'>
As the data parameter is not really used by any ftrace_dyn_arch_init,
remove that from ftrace_dyn_arch_init. This also removes the addr
local variable from ftrace_init which is now unused.

Note the documentation was imprecise as it did not suggest to set
(*data) to 0.

Link: http://lkml.kernel.org/r/1393268401-24379-4-git-send-email-jslaby@suse.cz

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: linux-arch@vger.kernel.org
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Pass retval through return in ftrace_dyn_arch_init()</title>
<updated>2014-03-07T15:06:13Z</updated>
<author>
<name>Jiri Slaby</name>
</author>
<published>2014-02-24T18:59:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af64a7cb09db77344c596a0bf3d57d77257e8bf5'/>
<id>urn:sha1:af64a7cb09db77344c596a0bf3d57d77257e8bf5</id>
<content type='text'>
No architecture uses the "data" parameter in ftrace_dyn_arch_init() in any
way, it just sets the value to 0. And this is used as a return value
in the caller -- ftrace_init, which just checks the retval against
zero.

Note there is also "return 0" in every ftrace_dyn_arch_init.  So it is
enough to check the retval and remove all the indirect sets of data on
all archs.

Link: http://lkml.kernel.org/r/1393268401-24379-3-git-send-email-jslaby@suse.cz

Cc: linux-arch@vger.kernel.org
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/x86: Have ftrace_write() return -EPERM and clean up callers</title>
<updated>2014-03-07T15:05:50Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
</author>
<published>2014-02-26T02:33:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92550405c493a3c2fa14bf37d1d60cd6c7d0f585'/>
<id>urn:sha1:92550405c493a3c2fa14bf37d1d60cd6c7d0f585</id>
<content type='text'>
Having ftrace_write() return -EPERM on failure, as that's what the callers
return, then we can clean up the code a bit. That is, instead of:

  if (ftrace_write(...))
     return -EPERM;
  return 0;

or

  if (ftrace_write(...)) {
     ret = -EPERM;
     goto_out;
  }

We can instead have:

  return ftrace_write(...);

or

  ret = ftrace_write(...);
  if (ret)
    goto out;

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