]> git.baikalelectronics.ru Git - kernel.git/commit
x86/ftrace: Do not jump to direct code in created trampolines
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 22 Apr 2020 16:25:42 +0000 (12:25 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 29 Jun 2020 15:42:48 +0000 (11:42 -0400)
commitc8572c47777f2e322ecc29c168302f1c60230194
treee00f659bf2156c567425f165d847357dda3c1442
parent7769cbad55ebe47b6e40dc62c56a0d08ce53bc59
x86/ftrace: Do not jump to direct code in created trampolines

When creating a trampoline based on the ftrace_regs_caller code, nop out the
jnz test that would jmup to the code that would return to a direct caller
(stored in the ORIG_RAX field) and not back to the function that called it.

Link: http://lkml.kernel.org/r/20200422162750.638839749@goodmis.org
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/x86/kernel/ftrace.c
arch/x86/kernel/ftrace_64.S