summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-03-03 04:14:51 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-03-03 04:14:51 +0100
commit048c28bf88792efc3b75d940110b6ae565847f43 (patch)
treeb0a6bc7be024e41ffdac219d2e4710a431f551a7
parent3f5c8f4602a17d3cf65847ee88baa057f7a4f597 (diff)
Keep supplementary L1 pages read-only
* i386/intel/pmap.c (pmap_bootstrap): Fix loop which keeps supplementary L1 pages read-only: break as soon as one of the L1 supplementary pages has been recognized, so that its pte does not get rewritten read-write.
-rw-r--r--i386/intel/pmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index b07644a..3505f52 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -764,11 +764,14 @@ void pmap_bootstrap()
else
{
#ifdef MACH_XEN
+ /* Keep supplementary L1 pages read-only */
int i;
for (i = 0; i < NSUP_L1; i++)
- if (va == (vm_offset_t) l1_map[i])
+ if (va == (vm_offset_t) l1_map[i]) {
WRITE_PTE(pte, pa_to_pte(_kvtophys(va))
| INTEL_PTE_VALID | global);
+ break;
+ }
if (i == NSUP_L1)
#endif /* MACH_XEN */
WRITE_PTE(pte, pa_to_pte(_kvtophys(va))