Re: [RFC][PATCH][REGRESSION FIX] x86/ftrace: Add ORC annotation to 64 bit ftrace assembly

From: Steven Rostedt
Date: Sat Dec 23 2017 - 01:00:33 EST


On Fri, 22 Dec 2017 20:43:37 -0600
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:

> Objtool doesn't like the fact that save_mcount_regs pushes rbp at the
> beginning, but it's never restored (directly, at least).
>
> How about something like this instead, where it skips the original rbp
> push? I didn't test it, but I think it should work. It at least gets
> rid of the warnings and doesn't need any unwind hints other than the
> UNWIND_HINT_EMPTY in return_to_handler.

There's a reason I did it that way, but don't remember exactly why. I
think we discussed this a while ago when we had issues with ftrace.S
during your first iterations of objtool.

I'll have to test all different compile options and different gcc
compiler versions.

-- Steve