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-next>] [day] [month] [year] [list]
Date:	Thu, 7 Feb 2008 01:21:34 +0200
From:	"Ahmed S. Darwish" <darwish.07@...il.com>
To:	Rusty Russel <rusty@...tcorp.com.au>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>
Cc:	lguest@...abs.org, linux-kernel@...r.kernel.org
Subject: [Lguest/x86]: Clash with ioremap_nocache() + _PAGE_PWT

Hi all,

Beginning from commit 4138cc3418f5, ioremap_nocache() sets the _PAGE_PWT
flag. 

Lguest doesn't accept a guest pte with a _PWT flag and reports a
"bad page table entry" in that case. 

I've removed check from lguest code and everything worked fine. 
Is this safe from the Lguest side ?

Mentioned commit [*]:

commit 4138cc3418f5eaa7524ff8e927102863f1ba0ea5
Author: Siddha, Suresh B <suresh.b.siddha@...el.com>
Date:   Wed Jan 30 13:33:43 2008 +0100

    x86: set strong uncacheable where UC is really desired
    
    Also use _PAGE_PWT for all the mappings which need uncache mapping.
    Instead of existing PAT2 which is UC- (and can be overwritten by MTRRs),
    we now use PAT3 which is strong uncacheable.
    
    This makes it consistent with pgprot_noncached()

diff --git a/arch/x86/mm/ioremap_32.c b/arch/x86/mm/ioremap_32.c
index 0b27831..ef0f6a4 100644
--- a/arch/x86/mm/ioremap_32.c
+++ b/arch/x86/mm/ioremap_32.c
@@ -119,7 +119,7 @@ EXPORT_SYMBOL(__ioremap);
 void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 {
 	unsigned long last_addr;
-	void __iomem *p = __ioremap(phys_addr, size, _PAGE_PCD);
+	void __iomem *p = __ioremap(phys_addr, size, _PAGE_PCD | _PAGE_PWT);
 	if (!p) 
 		return p; 

Thanks,

[*]: latest pull calls set_memory_uc() which also sets the _PWT flag.

--
Ahmed S. Darwish
Homepage: http://darwish.07.googlepages.com
Blog: http://darwish-07.blogspot.com
--
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