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: <20171127210054.jrs4nls2zixyclqc@hirez.programming.kicks-ass.net>
Date:   Mon, 27 Nov 2017 22:00:54 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...capital.net>,
        "H . Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...en8.de>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 02/24] x86/mm/kaiser: Prepare the x86/entry assembly code
 for entry/exit CR3 switching

On Mon, Nov 27, 2017 at 06:33:39PM +0100, Thomas Gleixner wrote:
> On Mon, 27 Nov 2017, Peter Zijlstra wrote:
> > On Mon, Nov 27, 2017 at 11:49:01AM +0100, Ingo Molnar wrote:
> > > diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
> > > index caf74a1bb3de..df0152bee8a8 100644
> > 
> > > @@ -198,6 +201,14 @@ ENTRY(entry_SYSCALL_64)
> > >  
> > >  	swapgs
> > >  	movq	%rsp, PER_CPU_VAR(rsp_scratch)
> > > +
> > > +	/*
> > > +	 * The kernel CR3 is needed to map the process stack, but we
> > > +	 * need a scratch register to be able to load CR3.  %rsp is
> > > +	 * clobberable right now, so use it as a scratch register.
> > > +	 * %rsp will look crazy here for a couple instructions.
> > > +	 */
> > > +	SWITCH_TO_KERNEL_CR3 scratch_reg=%rsp
> > >  	movq	PER_CPU_VAR(cpu_current_top_of_stack), %rsp
> > >  
> > >  	/* Construct struct pt_regs on stack */
> > 
> > I think we can do away with this one, on account of never getting here
> > because of entry_SYSCALL_64_trampoline.
> 
> It's on my list already. About 5 people noticed :)

Hey, at least we all agree ;-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ