Skip to contentSkip to conversation

UML - Update address space affected by pud_clear

PATCH New Jeff Dike 1 participant 1 message Nov 12, 2007 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 2/2 UML - Update address space affected by pud_clear

pud_clear wasn't setting the _PAGE_NEWPAGE bit, fooling tlb_flush into thinking that this area of the address space was up-to-date and not unmapping whatever was covered by the pud.

This manifested itself as ldconfig on x86_64 complaining about the first library it looked at not being a valid ELF file. A config file is mapped at 0x4000000, as the only thing mapped under its pud, and unmapped. The unmapping caused a pud_clear, which, due to this bug, didn't actually unmap the config file data on the host. The first library is then mapped at the same location, but is not actually mapped on the host because accesses to it cause no page faults. As a result, ldconfig sees the old config file data.

---
 include/asm-um/pgtable-3level.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/asm-um/pgtable-3level.h +1 -1
Index: linux-2.6.22/include/asm-um/pgtable-3level.h
===================================================================
@@ -71,7 +71,7 @@ static inline pmd_t *pmd_alloc_one(struc
 
 static inline void pud_clear (pud_t *pud)
 {
-        set_pud(pud, __pud(0));
+        set_pud(pud, __pud(_PAGE_NEWPAGE));
 }
 
 #define pud_page(pud) phys_to_page(pud_val(pud) & PAGE_MASK)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel