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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YDOXSw2vNLzRNdPN@hirez.programming.kicks-ass.net>
Date:   Mon, 22 Feb 2021 12:36:43 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     x86@...nel.org, tony.luck@...el.com, pjt@...gle.com
Cc:     linux-kernel@...r.kernel.org, r.marek@...embler.cz,
        jpoimboe@...hat.com, jikos@...nel.org
Subject: Re: [RFC][PATCH 1/2] x86/retpoline: Simplify retpolines

On Thu, Feb 18, 2021 at 05:59:39PM +0100, Peter Zijlstra wrote:
> Currently out retpolines consist of 2 symbols,
> __x86_indirect_thunk_\reg, which is the compiler target, and
> __x86_retpoline_\reg, which is the actual retpoline. Both are
> consecutive in code and aligned such that for any one register they
> both live in the same cacheline:
> 
>   0000000000000000 <__x86_indirect_thunk_rax>:
>    0:   ff e0                   jmpq   *%rax
>    2:   90                      nop
>    3:   90                      nop
>    4:   90                      nop
> 
>   0000000000000005 <__x86_retpoline_rax>:
>    5:   e8 07 00 00 00          callq  11 <__x86_retpoline_rax+0xc>
>    a:   f3 90                   pause
>    c:   0f ae e8                lfence
>    f:   eb f9                   jmp    a <__x86_retpoline_rax+0x5>
>   11:   48 89 04 24             mov    %rax,(%rsp)
>   15:   c3                      retq
>   16:   66 2e 0f 1f 84 00 00 00 00 00   nopw   %cs:0x0(%rax,%rax,1)
> 
> The thunk is an alternative_2, where one option is a jmp to the
> retpoline.

So the reason I originally did that was because objtool could not deal
with alternatives with stack ops. But we've recently fixed that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ