public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] x86: Fix ftrace recovery when code modification failed
@ 2014-02-17 15:22 Petr Mladek
  2014-02-17 15:22 ` [PATCH 1/4] x86: Clean up remove_breakpoint() in ftrace code Petr Mladek
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Petr Mladek @ 2014-02-17 15:22 UTC (permalink / raw)
  To: Steven Rostedt, Frederic Weisbecker, Masami Hiramatsu,
	Paul E. McKenney, Jiri Kosina
  Cc: linux-kernel, x86, Petr Mladek

Ftrace modifies function calls using Int3 breakpoints on x86. It patches
all functions in parallel to reduce the number of sync() calls. There is
a code that removes pending Int3 breakpoints when something goes wrong.

The recovery does not work on x86_64. I simulated an error in
ftrace_replace_code() and the system got rebooted.

This patch set fixes the recovery code, improves debugging of this
type of problem, and does some clean up.

BTW: It is an echo from the patch set that tried to use text_poke_bp()
instead of the ftrace-specific Int3 based patching code. Ftrace has
some specific restrictions. I did not find a way how to make the 
universal text_poke_bp effective, safe, and clean to be usable
there.

The patch set is against linux/tip. Last commit is a5b3cca53c43c3ba7
(Merge tag 'v3.14-rc3')

Petr Mladek (4):
  x86: Clean up remove_breakpoint() in ftrace code
  x86: Fix ftrace patching recovery code to work on x86_64
  x86: BUG when ftrace patching recovery fails
  x86: Fix order of warning messages when ftrace modifies code

 arch/x86/kernel/ftrace.c | 67 ++++++++++++++++++++++++------------------------
 1 file changed, 34 insertions(+), 33 deletions(-)

-- 
1.8.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-03-10 12:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 15:22 [PATCH 0/4] x86: Fix ftrace recovery when code modification failed Petr Mladek
2014-02-17 15:22 ` [PATCH 1/4] x86: Clean up remove_breakpoint() in ftrace code Petr Mladek
2014-02-17 15:22 ` [PATCH 2/4] x86: Fix ftrace patching recovery code to work on x86_64 Petr Mladek
2014-02-17 15:22 ` [PATCH 3/4] x86: BUG when ftrace patching recovery fails Petr Mladek
2014-02-17 15:22 ` [PATCH 4/4] x86: Fix order of warning messages when ftrace modifies code Petr Mladek
2014-03-06 23:19   ` Steven Rostedt
2014-03-07  8:43     ` Petr Mládek
2014-03-07 18:15       ` Steven Rostedt
2014-03-07 18:18   ` Steven Rostedt
2014-03-10  8:37     ` Petr Mládek
2014-03-10 12:50       ` Steven Rostedt
2014-02-21  4:23 ` [PATCH 0/4] x86: Fix ftrace recovery when code modification failed Steven Rostedt
2014-02-21 16:33   ` Petr Mládek
2014-02-21 18:01     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox