[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <efd2517c-3353-415a-f65c-33f6668db998@oracle.com>
Date: Fri, 3 Apr 2020 09:19:37 +0200
From: Alexandre Chartre <alexandre.chartre@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, jpoimboe@...hat.com,
jthierry@...hat.com, tglx@...utronix.de
Subject: Re: [PATCH 4/7] objtool: Add support for return trampoline call
On 4/2/20 5:27 PM, Peter Zijlstra wrote:
> On Thu, Apr 02, 2020 at 10:22:17AM +0200, Alexandre Chartre wrote:
>> With retpoline, the return instruction is used to branch to an address
>> stored on the stack. So, unlike a regular return instruction, when a
>> retpoline return instruction is reached the stack has been modified
>> compared to what we have when the function was entered.
>>
>> Provide the mechanism to explicitly call-out such return instruction
>> so that objtool can correctly handle them.
>
> https://lkml.kernel.org/r/20200331222703.GH2452@worktop.programming.kicks-ass.net
>
> And also, the split out version:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=core/objtool&id=ec9d9549901dfd2ff411676dfc624e50219e4d5a
>
Okay, so I can get rid of my retpoline_ret annotation and use UNWIND_HINT_RET_OFFSET
instead (which is more generic). Basically I can change my RETPOLINE_RET macro to:
.macro RETPOLINE_RET
UNWIND_HINT_RET_OFFSET
ret
.endm
Thanks,
alex.
Powered by blists - more mailing lists