[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210114154249.63526c1c@gandalf.local.home>
Date: Thu, 14 Jan 2021 15:42:49 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
Sedat Dilek <sedat.dilek@...il.com>,
Kees Cook <keescook@...omium.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
clang-built-linux@...glegroups.com, Miroslav Benes <mbenes@...e.cz>
Subject: Re: [PATCH 16/21] x86/ftrace: Support objtool vmlinux.o validation
in ftrace_64.S
On Thu, 14 Jan 2021 13:40:12 -0600
Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> 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.
If you say so ;-)
Acked-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
-- Steve
>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
> ---
> arch/x86/kernel/ftrace_64.S | 5 ++---
> 1 file 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
Powered by blists - more mailing lists