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:   Tue, 12 May 2020 22:02:30 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Alexandre Chartre <alexandre.chartre@...cle.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        Brian Gerst <brgerst@...il.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Will Deacon <will@...nel.org>,
        Tom Lendacky <thomas.lendacky@....com>,
        Wei Liu <wei.liu@...nel.org>,
        Michael Kelley <mikelley@...rosoft.com>,
        Jason Chen CJ <jason.cj.chen@...el.com>,
        Zhao Yakui <yakui.zhao@...el.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: Re: [patch V5 02/38] x86/entry/64: Use native swapgs in
 asm_native_load_gs_index()

On Tue, 12 May 2020 23:01:01 +0200
Thomas Gleixner <tglx@...utronix.de> wrote:

> When PARAVIRT_XXL is in use, then load_gs_index() uses
> xen_load_gs_index() and (asm_))native_load_gs_index() is unused.
> 
> It's therefore pointless to use the paravirtualized SWAPGS implementation
> in asm_native_load_gs_index(). Switch it to a plain swapgs.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Juergen Gross <jgross@...e.com>
> ---
>  arch/x86/entry/entry_64.S |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -1043,11 +1043,11 @@ idtentry simd_coprocessor_error		do_simd
>   */
>  SYM_FUNC_START(asm_native_load_gs_index)

Small nit, but I would just call this: asm_load_gs_index.

The "native" word is usually reserved for functions that are for bare
metal and have a paravirt counterpart. As there is a
native_load_gs_index(), I don't envision a need for a paravirt version
of the asm function.

Other than that.

Reviewed-by: Steven Rostedt (VMware) <rostedt@...dmis.org>

-- Steve


>  	FRAME_BEGIN
> -	SWAPGS
> +	swapgs
>  .Lgs_change:
>  	movl	%edi, %gs
>  2:	ALTERNATIVE "", "mfence", X86_BUG_SWAPGS_FENCE
> -	SWAPGS
> +	swapgs
>  	FRAME_END
>  	ret
>  SYM_FUNC_END(asm_native_load_gs_index)
> @@ -1057,7 +1057,7 @@ EXPORT_SYMBOL(asm_native_load_gs_index)
>  	.section .fixup, "ax"
>  	/* running with kernelgs */
>  SYM_CODE_START_LOCAL_NOALIGN(.Lbad_gs)
> -	SWAPGS					/* switch back to user gs */
> +	swapgs					/* switch back to user gs */
>  .macro ZAP_GS
>  	/* This can't be a string because the preprocessor needs to see it. */
>  	movl $__USER_DS, %eax

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ