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: <20180330101020.6g2pib3xaftawl5h@gmail.com>
Date:   Fri, 30 Mar 2018 12:10:20 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Dominik Brodowski <linux@...inikbrodowski.net>
Cc:     linux-kernel@...r.kernel.org, viro@...IV.linux.org.uk,
        torvalds@...ux-foundation.org, arnd@...db.de,
        linux-arch@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Andi Kleen <ak@...ux.intel.com>,
        Ingo Molnar <mingo@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Lutomirski <luto@...nel.org>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Brian Gerst <brgerst@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: Re: [PATCH 7/7] x86/entry/64: extend register clearing on syscall
 entry to lower registers


* Dominik Brodowski <linux@...inikbrodowski.net> wrote:

>  	.endif
>  	pushq	\rdx		/* pt_regs->dx */
> +	xorl	%edx, %edx	/* nosepc   dx */
>  	pushq   %rcx		/* pt_regs->cx */
> +	xorl	%ecx, %ecx	/* nosepc   cx */
>  	pushq   \rax		/* pt_regs->ax */
>  	pushq   %r8		/* pt_regs->r8 */
>  	xorl	%r8d, %r8d	/* nospec   r8 */
> diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
> index 08425c42f8b7..23e0945959e5 100644
> --- a/arch/x86/entry/entry_64_compat.S
> +++ b/arch/x86/entry/entry_64_compat.S
> @@ -220,8 +220,11 @@ GLOBAL(entry_SYSCALL_compat_after_hwframe)
>  	pushq	%rax			/* pt_regs->orig_ax */
>  	pushq	%rdi			/* pt_regs->di */
>  	pushq	%rsi			/* pt_regs->si */
> +	xorl	%esi, %esi		/* nosepc   si */
>  	pushq	%rdx			/* pt_regs->dx */
> +	xorl	%edx, %edx		/* nosepc   dx */
>  	pushq	%rbp			/* pt_regs->cx (stashed in bp) */
> +	xorl	%ecx, %ecx		/* nosepc   cx */
>  	pushq	$-ENOSYS		/* pt_regs->ax */
>  	pushq   $0			/* pt_regs->r8  = 0 */
>  	xorl	%r8d, %r8d		/* nospec   r8 */
> @@ -365,8 +368,11 @@ ENTRY(entry_INT80_compat)
>  
>  	pushq	(%rdi)			/* pt_regs->di */
>  	pushq	%rsi			/* pt_regs->si */
> +	xorl	%esi, %esi		/* nosepc   si */
>  	pushq	%rdx			/* pt_regs->dx */
> +	xorl	%edx, %edx		/* nosepc   dx */
>  	pushq	%rcx			/* pt_regs->cx */
> +	xorl	%ecx, %ecx		/* nosepc   cx */
>  	pushq	$-ENOSYS		/* pt_regs->ax */
>  	pushq   $0			/* pt_regs->r8  = 0 */
>  	xorl	%r8d, %r8d		/* nospec   r8 */

s/nosepc
 /nospec

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ