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:	Fri, 20 Feb 2009 07:40:33 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ingo Molnar <mingo@...e.hu>
cc:	Steven Rostedt <rostedt@...dmis.org>,
	Huang Ying <ying.huang@...el.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Arjan van de Ven <arjan@...radead.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] x86: use the right protections for split-up pagetables



On Fri, 20 Feb 2009, Ingo Molnar wrote:
> 
> Agreed, split_large_page() was just plain confused here - there 
> was no hidden reason for this logic. It makes no sense to bring 
> any pte level protection information to the PMD level because a 
> pmd entry covers a set of 512 ptes so there's no singular 
> protection attribute that can be carried to it.

Btw, I think split_large_page() is confused in another way too, although 
I'm not entirely sure that it matters. I suspect that it doesn't, if I 
read things correctly.

The confusion? When it moves the 'ref_prot' bits from the upper level, it 
doesn't do the right thing for the PAT bit. That bit is special, and moves 
around depending on level. In the upper levels, it's bit#12, and in the 
final 4k pte level it's bit#7.

So _if_ the PAT bit ever matters, it looks like split_large_page() does 
the wrong thing.

Now, it looks like we avoid the PAT bit on purpose, and we only ever 
encode four PAT values (ie we use only the PCD/PWT bits, and leave the PAT 
bit clear - we don't need any more cases), _but_ we actually do end up 
looking at the PAT bit anyway in cache_attr(). So it looks like at least 
some of the code is _trying_ to handle the PAT bit, but I can pretty much 
guarantee that at least split_large_page() is broken if it is ever set.

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