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: <20230809125101.xxwhuipfvj7kbasn@treble>
Date:   Wed, 9 Aug 2023 08:51:01 -0400
From:   Josh Poimboeuf <jpoimboe@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org, David.Kaplan@....com,
        Andrew.Cooper3@...rix.com, gregkh@...uxfoundation.org
Subject: Re: [RFC][PATCH 05/17] x86/cpu: Cleanup the untrain mess

On Wed, Aug 09, 2023 at 09:12:23AM +0200, Peter Zijlstra wrote:
> Since there can only be one active return_thunk, there only needs be
> one (matching) untrain_ret. It fundamentally doesn't make sense to
> allow multiple untrain_ret at the same time.
> 
> Fold all the 3 different untrain methods into a single (temporary)
> helper stub.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  arch/x86/include/asm/nospec-branch.h |   19 +++++--------------
>  arch/x86/lib/retpoline.S             |    7 +++++++
>  2 files changed, 12 insertions(+), 14 deletions(-)
> 
> --- a/arch/x86/include/asm/nospec-branch.h
> +++ b/arch/x86/include/asm/nospec-branch.h
> @@ -272,9 +272,9 @@
>  .endm
>  
>  #ifdef CONFIG_CPU_UNRET_ENTRY
> -#define CALL_ZEN_UNTRAIN_RET	"call zen_untrain_ret"
> +#define CALL_UNTRAIN_RET	"call entry_untrain_ret"
>  #else
> -#define CALL_ZEN_UNTRAIN_RET	""
> +#define CALL_UNTRAIN_RET	""
>  #endif
>  
>  /*
> @@ -293,15 +293,10 @@
>  	defined(CONFIG_CALL_DEPTH_TRACKING) || defined(CONFIG_CPU_SRSO)
>  	VALIDATE_UNRET_END
>  	ALTERNATIVE_3 "",						\
> -		      CALL_ZEN_UNTRAIN_RET, X86_FEATURE_UNRET,		\
> +		      CALL_UNTRAIN_RET, X86_FEATURE_UNRET,		\

SRSO doesn't have X86_FEATURE_UNRET set.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ