commit-hurd
[Top][All Lists]
Advanced

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

gnumach/i386 i386/mp_desc.h i386/ldt.c i386/ldt...


From: Roland McGrath
Subject: gnumach/i386 i386/mp_desc.h i386/ldt.c i386/ldt...
Date: Thu, 03 Oct 2002 22:45:01 -0400

CVSROOT:        /cvsroot/hurd
Module name:    gnumach
Changes by:     Roland McGrath <address@hidden> 02/10/03 22:45:01

Modified files:
        i386/i386      : mp_desc.h ldt.c ldt.h 
        i386/intel     : pmap.c 

Log message:
        2002-10-03  Roland McGrath  <address@hidden>
        
        Remove magic %gs:0 pseudo-register support.
        * i386/i386/ldt.h (USER_GS): Macro removed.
        * i386/i386/pcb.c (pcb_init): Set gs to USER_DS, not USER_GS.
        (thread_setstatus): Likewise.
        * i386/i386/mp_desc.h (struct mp_desc_table): Remove member
        `user_thread_register'.
        * i386/i386/thread.h (struct i386_machine_state): Likewise.
        * i386/i386/mp_desc.c (mp_desc_init): Don't set up USER_GS in LDT.
        * i386/i386/ldt.c (ldt_init): Likewise.
        * i386/intel/pmap.c (pmap_bootstrap): Don't give users access to
        direct-mapped pages.
        * i386/i386/user_ldt.c (i386_set_ldt): Don't cap segment limits.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnumach/gnumach/i386/i386/mp_desc.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnumach/gnumach/i386/i386/ldt.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnumach/gnumach/i386/i386/ldt.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnumach/gnumach/i386/intel/pmap.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gnumach/i386/i386/ldt.c
diff -u gnumach/i386/i386/ldt.c:1.3 gnumach/i386/i386/ldt.c:1.4
--- gnumach/i386/i386/ldt.c:1.3 Mon May 27 19:01:50 2002
+++ gnumach/i386/i386/ldt.c     Thu Oct  3 22:45:01 2002
@@ -36,7 +36,6 @@
 extern int syscall();
 
 struct x86_desc ldt[LDTSZ];
-extern natural_t user_thread_register;
 
 void
 ldt_init()
@@ -59,9 +58,6 @@
                            VM_MIN_ADDRESS,
                            VM_MAX_ADDRESS-VM_MIN_ADDRESS-4096,
                            ACC_PL_U|ACC_DATA_W, SZ_32);
-
-       fill_ldt_descriptor(USER_GS, kvtolin(&user_thread_register),
-                           3, ACC_PL_U|ACC_DATA_W, SZ_32);
 
        /* Activate the LDT.  */
        set_ldt(KERNEL_LDT);
Index: gnumach/i386/i386/ldt.h
diff -u gnumach/i386/i386/ldt.h:1.3 gnumach/i386/i386/ldt.h:1.4
--- gnumach/i386/i386/ldt.h:1.3 Mon May 27 19:01:50 2002
+++ gnumach/i386/i386/ldt.h     Thu Oct  3 22:45:01 2002
@@ -45,7 +45,6 @@
 #define        USER_SCALL      0x07            /* system call gate */
 #define        USER_CS         0x17            /* user code segment */
 #define        USER_DS         0x1f            /* user data segment */
-#define        USER_GS         0x0f            /* user thread register segment 
*/
 
 #define        LDTSZ           4
 
Index: gnumach/i386/i386/mp_desc.h
diff -u gnumach/i386/i386/mp_desc.h:1.3 gnumach/i386/i386/mp_desc.h:1.4
--- gnumach/i386/i386/mp_desc.h:1.3     Mon May 27 19:01:50 2002
+++ gnumach/i386/i386/mp_desc.h Thu Oct  3 22:45:01 2002
@@ -54,7 +54,6 @@
  */
 struct mp_desc_table {
        int cpu_number;         /* to be fetched via %gs */
-       natural_t user_thread_register; /* USER_GS:0 points here */
        struct x86_gate idt[IDTSZ];     /* IDT */
        struct x86_desc gdt[GDTSZ];     /* GDT */
        struct x86_desc ldt[LDTSZ];     /* LDT */
Index: gnumach/i386/intel/pmap.c
diff -u gnumach/i386/intel/pmap.c:1.5 gnumach/i386/intel/pmap.c:1.6
--- gnumach/i386/intel/pmap.c:1.5       Mon May 27 19:01:51 2002
+++ gnumach/i386/intel/pmap.c   Thu Oct  3 22:45:01 2002
@@ -697,15 +697,10 @@
                        pt_entry_t *pte;
                        vm_offset_t pteva;
 
-                       /* Initialize the page directory entry.  We give
-                          user-mode access to everything because it will
-                          be constrained by the segmentation.  This allows
-                          special-purpose segments to be set up by kernel
-                          code to allow user access to specific locations
-                          above VM_MAX_ADDRESS.  */
+                       /* Initialize the page directory entry.  */
                        *pde = (pa_to_pte((vm_offset_t)ptable)
                                | INTEL_PTE_VALID | INTEL_PTE_WRITE
-                               | INTEL_PTE_USER | kernel_pte_global);
+                               | kernel_pte_global);
 
                        /* Initialize the page table.  */
                        for (pte = ptable; (va < phys_mem_max) && (pte < 
ptable+NPTES); pte++)
@@ -720,8 +715,7 @@
                              entry |= pa_to_pte(va) | INTEL_PTE_VALID;
                              if ((va < (vm_offset_t)_start)
                                  || (va + INTEL_PGBYTES > (vm_offset_t)etext))
-                               /* See comment above about user access.  */
-                               entry |= INTEL_PTE_WRITE | INTEL_PTE_USER;
+                               entry |= INTEL_PTE_WRITE;
                              va += INTEL_PGBYTES;
                            }
                          WRITE_PTE_FAST(pte, entry);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]