Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Just checking a global marker (pm_hiexec)...



details:   https://anonhg.NetBSD.org/src/rev/0d2ec029cc36
branches:  trunk
changeset: 556241:0d2ec029cc36
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Dec 10 13:59:48 2003 +0000

description:
Just checking a global marker (pm_hiexec) for the highest executable
address currently in effect does not always work: There might be more
instances of the code segment selector in other threads, on other CPUs
and in *jmp_bufs.
So always check whether the CS needs updating, if it is not already
set to the "BIG" value.
This code needs more cleanup, this is considered a stopgap fix only.

diffstat:

 sys/arch/i386/i386/pmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 148c222dea2b -r 0d2ec029cc36 sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Wed Dec 10 13:24:59 2003 +0000
+++ b/sys/arch/i386/i386/pmap.c Wed Dec 10 13:59:48 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.164 2003/11/03 04:02:13 yamt Exp $  */
+/*     $NetBSD: pmap.c,v 1.165 2003/12/10 13:59:48 drochner Exp $      */
 
 /*
  *
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.164 2003/11/03 04:02:13 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.165 2003/12/10 13:59:48 drochner Exp $");
 
 #include "opt_cputype.h"
 #include "opt_user_ldt.h"
@@ -769,7 +769,7 @@
                        va = trunc_page(ent->end) - PAGE_SIZE;
        }
        vm_map_unlock_read(map);
-       if (va == pm->pm_hiexec)
+       if (va == pm->pm_hiexec && tf->tf_cs == GSEL(GUCODEBIG_SEL, SEL_UPL))
                return (0);
 
        pm->pm_hiexec = va;



Home | Main Index | Thread Index | Old Index