lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 3 Apr 2020 10:14:49 -0700 (PDT)
From:   Alexandre Chartre <alexandre.chartre@...cle.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org, peterz@...radead.org,
        jthierry@...hat.com, tglx@...utronix.de
Subject: Re: [PATCH 5/7] x86/speculation: Annotate intra-function calls


On 4/3/20 6:16 PM, Josh Poimboeuf wrote:
> On Fri, Apr 03, 2020 at 11:05:38AM -0500, Josh Poimboeuf wrote:
>> On Thu, Apr 02, 2020 at 10:22:18AM +0200, Alexandre Chartre wrote:
>>>   .macro RETPOLINE_JMP reg:req
>>> -	call	.Ldo_rop_\@
>>> +	INTRA_FUNCTION_CALL .Ldo_rop_\@
>>>   .Lspec_trap_\@:
>>>   	pause
>>>   	lfence
>>> @@ -102,7 +116,7 @@
>>>   .Ldo_retpoline_jmp_\@:
>>>   	RETPOLINE_JMP \reg
>>>   .Ldo_call_\@:
>>> -	call	.Ldo_retpoline_jmp_\@
>>> +	INTRA_FUNCTION_CALL .Ldo_retpoline_jmp_\@
>>>   .endm
>>
>> There's a catch: this is part of an alternative.  Which means if
>> X86_FEATURE_RETPOLINE isn't set at runtime, then the retpoline won't be
>> there and the ORC data will be wrong.
>>
>> In fact objtool should probably be made smart enough to warn about this
>> situation, when an alternative changes the stack state.
>>
>> The only way I can think of to fix this is to have ORC alternatives :-/

So that means that any alternative that does a stack manipulation isn't
currently supported?

alex.

> Or they could be converted to use static branches instead of
> alternatives.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ