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]
Message-ID: <20200416152242.GQ20730@hirez.programming.kicks-ass.net>
Date:   Thu, 16 Apr 2020 17:22:42 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     jpoimboe@...hat.com, alexandre.chartre@...cle.com
Cc:     linux-kernel@...r.kernel.org, jthierry@...hat.com,
        tglx@...utronix.de, x86@...nel.org
Subject: Re: [RFC][PATCH 6/7] x86/retpoline: Out-of-line retpoline


Bah, chunks went missing, I'll make sure to push out a working version.

On Thu, Apr 16, 2020 at 05:07:58PM +0200, Peter Zijlstra wrote:
> --- a/arch/x86/lib/retpoline.S
> +++ b/arch/x86/lib/retpoline.S
> @@ -7,15 +7,30 @@
>  #include <asm/alternative-asm.h>
>  #include <asm/export.h>
>  #include <asm/nospec-branch.h>
> +#include <asm/unwind_hints.h>
> +#include <asm/frame.h>
>  
>  .macro THUNK reg
>  	.section .text.__x86.indirect_thunk
>  
> +	.align 32
>  SYM_FUNC_START(__x86_indirect_thunk_\reg)
> -	CFI_STARTPROC
> -	JMP_NOSPEC %\reg
> -	CFI_ENDPROC
> +	JMP_NOSPEC \reg
>  SYM_FUNC_END(__x86_indirect_thunk_\reg)
> +
> +SYM_FUNC_START_NOALIGN(__x86_retpoline_\reg)
> +	ANNOTATE_INTRA_FUNCTION_CALL
> +	call	.Ldo_rop_\@
> +.Lspec_trap_\@:
	UNWIND_HINT_EMPTY
> +	pause
> +	lfence
> +	jmp	.Lspec_trap_\@
> +.Ldo_rop_\@:
> +	mov	%\reg, (%_ASM_SP)
> +	UNWIND_HINT_RET_OFFSET
> +	ret
> +SYM_FUNC_END(__x86_retpoline_\reg)
> +
>  .endm
>  
>  /*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ