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: <alpine.DEB.2.20.1612151826120.3470@nanos>
Date:   Thu, 15 Dec 2016 18:26:28 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>
cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Kyle Huey <khuey@...ehuey.com>,
        Andy Lutomirski <luto@...nel.org>
Subject: Re: [patch 1/3] x86/process: Optimize TIF checks in
 switch_to_extra()

On Thu, 15 Dec 2016, Peter Zijlstra wrote:
> On Thu, Dec 15, 2016 at 04:44:02PM -0000, Thomas Gleixner wrote:
> >  void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
> >  		      struct tss_struct *tss)
> >  {
> >  	struct thread_struct *prev, *next;
> > +	unsigned long tifp, tifn;
> >  
> >  	prev = &prev_p->thread;
> >  	next = &next_p->thread;
> >  
> > +	tifn = task_thread_info(next_p)->flags;
> > +	tifp = task_thread_info(prev_p)->flags;
> > +	switch_to_bitmap(tss, prev, next, tifp, tifn);
> > +
> > +	propagate_user_return_notify(prev_p, next_p);
> > +
> > +	if ((tifp ^ tifn) & _TIF_BLOCKSTEP) {
> >  		unsigned long debugctl = get_debugctlmsr();
> >  
> >  		debugctl &= ~DEBUGCTLMSR_BTF;
> > +		if (tifn & _TIF_BLOCKSTEP)
> >  			debugctl |= DEBUGCTLMSR_BTF;
> >  		update_debugctlmsr(debugctl);
> >  	}
> 
> Going by the toggle patter you have elsewhere, wouldn't that then be:
> 
> 	if ((tifp ^ tifn) & _TIF_BLOCKSTEP) {
> 		unsigned long debugctl = get_debugctlmsr();
> 
> 		debugctl ^= DEBUGCTLMSR_BTF;
> 		update_debugctlmsr(debugctl);
> 	}

See the next patch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ