lkml.org 
[lkml]   [2020]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] objtool,ftrace: Implement UNWIND_HINT_RET_OFFSET
On Tue, Mar 31, 2020 at 09:58:41PM +0200, Peter Zijlstra wrote:
> On Tue, Mar 31, 2020 at 11:31:36AM -0400, Steven Rostedt wrote:
>
> > Can you send this change as a separate patch as it has nothing to do with
> > this current change, and is a clean up patch that stands on its own.
>
> I also found this.. should I write it up?
>
> ---
> diff --git a/arch/x86/kernel/ftrace_64.S b/arch/x86/kernel/ftrace_64.S
> index 369e61faacfe..0f108096f278 100644
> --- a/arch/x86/kernel/ftrace_64.S
> +++ b/arch/x86/kernel/ftrace_64.S
> @@ -23,7 +23,7 @@
> #endif /* CONFIG_FRAME_POINTER */
>
> /* Size of stack used to save mcount regs in save_mcount_regs */
> -#define MCOUNT_REG_SIZE (SS+8 + MCOUNT_FRAME_SIZE)
> +#define MCOUNT_REG_SIZE (SIZEOF_PTREGS + MCOUNT_FRAME_SIZE)
>
> /*
> * gcc -pg option adds a call to 'mcount' in most functions.
> @@ -77,7 +77,7 @@
> /*
> * We add enough stack to save all regs.
> */
> - subq $(MCOUNT_REG_SIZE - MCOUNT_FRAME_SIZE), %rsp
> + subq $(SIZEOF_PTREGS), %rsp
> movq %rax, RAX(%rsp)
> movq %rcx, RCX(%rsp)
> movq %rdx, RDX(%rsp)

I was going to suggest the same thing :-)

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

--
Josh

\
 
 \ /
  Last update: 2020-03-31 22:27    [W:0.070 / U:3.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site