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 11:24:34 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
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, v2] x86: use the right protections for split-up
	pagetables


* Ingo Molnar <mingo@...e.hu> wrote:

> [...] There's never any good reason to play protection games 
> with higher-level pagetable entries. We dont do it to 
> user-space pagetables either - we just populate them to 
> _PAGE_TABLE and that's it.

btw., this means that we could probably even use _PAGE_TABLE 
here (i.e. with the _PAGE_USER bit set), and rely on the PTE 
clearing the user bit ... but in this case that tiny bit of 
paranoia seems justified.

Btw., i also checked when this bug got introduced, and it got 
introduced 5 years ago (in May 2004) in 2.6.7-rc1, via this 
commit [historic-git sha1]:

 fb75a3d: [PATCH] x86-64 updates

 Date:   Fri May 14 20:40:53 2004 -0700

 [...]
     - Handle NX bit for code pages correctly in change_page_attr()
 [...]

-                       set_pte(kpte,mk_pte(split, PAGE_KERNEL));
+                       set_pte(kpte,mk_pte(split, ref_prot));

( That 'set_pte(kpte,...)' sequence is not a pte update but a 
  _pmd_ update, it is the ex-largepage pte, i.e. the pmd. )

So it's an ancient, dormant bug in the CPA code that nobody ever 
triggered, and we didnt notice when we rewrote that code either.

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