summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2021-01-21 15:29:31 -0600
committerJosh Poimboeuf <jpoimboe@redhat.com>2021-01-26 11:33:02 -0600
commit7cae4b1cf1cc42f490422e20662169e8656c915a (patch)
tree9dd70a8b1a2ab9efafe19d3d83171637e98f0e67
parent82694854caa8badab7c5d3a19c0139e8b471b1d3 (diff)
downloadlinux-stable-7cae4b1cf1cc42f490422e20662169e8656c915a.tar.gz
linux-stable-7cae4b1cf1cc42f490422e20662169e8656c915a.tar.bz2
linux-stable-7cae4b1cf1cc42f490422e20662169e8656c915a.zip
x86/ftrace: Support objtool vmlinux.o validation in ftrace_64.S
With objtool vmlinux.o validation of return_to_handler(), now that objtool has visibility inside the retpoline, jumping from EMPTY state to a proper function state results in a stack state mismatch. return_to_handler() is actually quite normal despite the underlying magic. Just annotate it as a normal function. Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/14f48e623f61dbdcd84cf27a56ed8ccae73199ef.1611263462.git.jpoimboe@redhat.com
-rw-r--r--arch/x86/kernel/ftrace_64.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/ftrace_64.S b/arch/x86/kernel/ftrace_64.S
index 1bf568d901b1..7c273846c687 100644
--- a/arch/x86/kernel/ftrace_64.S
+++ b/arch/x86/kernel/ftrace_64.S
@@ -334,8 +334,7 @@ SYM_FUNC_START(ftrace_graph_caller)
retq
SYM_FUNC_END(ftrace_graph_caller)
-SYM_CODE_START(return_to_handler)
- UNWIND_HINT_EMPTY
+SYM_FUNC_START(return_to_handler)
subq $24, %rsp
/* Save the return values */
@@ -350,5 +349,5 @@ SYM_CODE_START(return_to_handler)
movq (%rsp), %rax
addq $24, %rsp
JMP_NOSPEC rdi
-SYM_CODE_END(return_to_handler)
+SYM_FUNC_END(return_to_handler)
#endif