From: Jeff Dike <jdike@addtoit.com>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] [PATCH 2/2] UML - Update address space affected by pud_clear
Date: Mon, 12 Nov 2007 10:45:44 -0500 [thread overview]
Message-ID: <20071112154544.GA5576@c2.user-mode-linux.org> (raw)
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.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
include/asm-um/pgtable-3level.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.22/include/asm-um/pgtable-3level.h
===================================================================
--- linux-2.6.22.orig/include/asm-um/pgtable-3level.h 2007-10-12 12:09:08.000000000 -0400
+++ linux-2.6.22/include/asm-um/pgtable-3level.h 2007-11-07 12:20:02.000000000 -0500
@@ -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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jeff Dike <jdike@addtoit.com>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [PATCH 2/2] UML - Update address space affected by pud_clear
Date: Mon, 12 Nov 2007 10:45:44 -0500 [thread overview]
Message-ID: <20071112154544.GA5576@c2.user-mode-linux.org> (raw)
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.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
include/asm-um/pgtable-3level.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.22/include/asm-um/pgtable-3level.h
===================================================================
--- linux-2.6.22.orig/include/asm-um/pgtable-3level.h 2007-10-12 12:09:08.000000000 -0400
+++ linux-2.6.22/include/asm-um/pgtable-3level.h 2007-11-07 12:20:02.000000000 -0500
@@ -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)
next reply other threads:[~2007-11-12 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-12 15:45 Jeff Dike [this message]
2007-11-12 15:45 ` [PATCH 2/2] UML - Update address space affected by pud_clear Jeff Dike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071112154544.GA5576@c2.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.