* [PATCH 4/6] UML - Fix pte bit collision
@ 2007-03-27 18:27 Jeff Dike
0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2007-03-27 18:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: Miklos Szeredi, LKML, uml-devel
From: Miklos Szeredi <mszeredi@suse.cz>
_PAGE_PROTNONE conflicts with the lowest bit of pgoff. This causes
all sorts of weirdness when nonlinear mappings are used.
Took me a good half day to track this down.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
include/asm-um/pgtable-2level.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: linux-2.6.21-mm/include/asm-um/pgtable-2level.h
===================================================================
--- linux-2.6.21-mm.orig/include/asm-um/pgtable-2level.h 2007-03-27 12:34:31.000000000 -0400
+++ linux-2.6.21-mm/include/asm-um/pgtable-2level.h 2007-03-27 12:52:12.000000000 -0400
@@ -45,12 +45,12 @@ static inline void pgd_mkuptodate(pgd_t
((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
/*
- * Bits 0 through 3 are taken
+ * Bits 0 through 4 are taken
*/
-#define PTE_FILE_MAX_BITS 28
+#define PTE_FILE_MAX_BITS 27
-#define pte_to_pgoff(pte) (pte_val(pte) >> 4)
+#define pte_to_pgoff(pte) (pte_val(pte) >> 5)
-#define pgoff_to_pte(off) ((pte_t) { ((off) << 4) + _PAGE_FILE })
+#define pgoff_to_pte(off) ((pte_t) { ((off) << 5) + _PAGE_FILE })
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-27 18:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-27 18:27 [PATCH 4/6] UML - Fix pte bit collision Jeff Dike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox