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:	Wed, 16 May 2012 10:55:10 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Alex Shi <alex.shi@...el.com>
CC:	tglx@...utronix.de, mingo@...hat.com, arnd@...db.de,
	rostedt@...dmis.org, fweisbec@...il.com, jeremy@...p.org,
	riel@...hat.com, luto@....edu, avi@...hat.com, len.brown@...el.com,
	dhowells@...hat.com, fenghua.yu@...el.com, borislav.petkov@....com,
	yinghai@...nel.org, 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,
	tj@...nel.org, oleg@...hat.com, axboe@...nel.dk, jmorris@...ei.org,
	a.p.zijlstra@...llo.nl, kamezawa.hiroyu@...fujitsu.com,
	viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
	yongjie.ren@...el.com
Subject: Re: [PATCH v5 5/7] x86/tlb: add tlb_flushall_shift for specific CPU

On 05/15/2012 11:49 PM, Alex Shi wrote:
> +	if (!cpu_has_invlpg || vma->vm_flags & VM_HUGETLB
> +			|| tlb_flushall_shift == (u16)TLB_FLUSH_ALL) {

I asked for you to fold the cpu_has_invlpg test into tlb_flushall_shift.
 Also, (u16)TLB_FLUSH_ALL really is hit up with the ugly stick... why on
earth is this u16?  It's a bit shift, so it can't be bigger than 6 bits
anyway... and if you want to be able to use -1 as a sentinel you might
as well make it a signed value and use < 0 or == -1 as the test.

Am I missing something really fundamental here?

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
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