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:	Thu, 10 May 2012 12:42:12 +0200
From:	Borislav Petkov <bp@...64.org>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Alex Shi <alex.shi@...el.com>, rob@...dley.net, tglx@...utronix.de,
	mingo@...hat.com, hpa@...or.com, arnd@...db.de,
	rostedt@...dmis.org, fweisbec@...il.com, jeremy@...p.org,
	gregkh@...uxfoundation.org, borislav.petkov@....com,
	riel@...hat.com, luto@....edu, avi@...hat.com, len.brown@...el.com,
	dhowells@...hat.com, fenghua.yu@...el.com, ak@...ux.intel.com,
	cpw@....com, steiner@....com, akpm@...ux-foundation.org,
	penberg@...nel.org, hughd@...gle.com, rientjes@...gle.com,
	kosaki.motohiro@...fujitsu.com, n-horiguchi@...jp.nec.com,
	paul.gortmaker@...driver.com, trenn@...e.de, tj@...nel.org,
	oleg@...hat.com, axboe@...nel.dk, kamezawa.hiroyu@...fujitsu.com,
	viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 5/7] x86/tlb: add tlb flush all factor for specific CPU

On Thu, May 10, 2012 at 11:38:35AM +0200, Peter Zijlstra wrote:
> On Thu, 2012-05-10 at 13:00 +0800, Alex Shi wrote:
> 
> 
> > +void intel_tlb_flushall_factor_set(struct cpuinfo_x86 *c)
> > +{
> > +       if (!cpu_has_invlpg) {
> > +               tlb_flushall_factor = -1;
> > +               return;
> > +       }
> 
> ...
> 
> > +       if (!cpu_has_invlpg || vma->vm_flags & VM_HUGETLB
> > +                       || tlb_flushall_factor == (u16)TLB_FLUSH_ALL)
> > {
> >  flush_all: 
> 
> Since you set tlb_flushall_factor (I'd have called it _shift)

Seconded, tlb_flushall_shift makes more sense, considering how it is
being used.

> to -1 when !invlpg there's a redundant check in there.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ