[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %gs:0 thread pseudoregister in oskit-mach
From: |
Jeroen Dekkers |
Subject: |
Re: %gs:0 thread pseudoregister in oskit-mach |
Date: |
Tue, 23 Apr 2002 19:11:55 +0200 |
User-agent: |
Mutt/1.3.28i |
On Tue, Apr 23, 2002 at 07:08:08PM +0200, Jeroen Dekkers wrote:
> On Sun, Apr 21, 2002 at 03:26:56PM -0400, Roland McGrath wrote:
> > > You forgot to make the page table entries also user accessible. Other
> > > than that, everything works perfect. Thank you.
> >
> > Great. Thanks for the fix, and thanks for testing. Have you/can you also
> > test to be absolutely sure that users cannot access anything but the one
> > word from %gs, and that they cannot access >VM_MAX_ADDRESS using %ds
> > (i.e. normal accesses)? I'm pretty darn sure that is all correct, but just
> > to be paranoid.
>
> I tried to acces %gs:4 and this failed with an "illegal
> instruction". I also tried to access 0xc0000000 which got a
> segmentation fault. I don't know if I have to test more.
When hitting the send button I recalled that I had to remove an
assert, see the patch.
Index: i386/i386/trap.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/i386/trap.c,v
retrieving revision 1.4.2.3
diff -u -p -r1.4.2.3 trap.c
--- i386/i386/trap.c 5 Apr 2001 06:52:46 -0000 1.4.2.3
+++ i386/i386/trap.c 23 Apr 2002 17:11:00 -0000
@@ -468,7 +468,6 @@ int user_trap(regs)
printf("user page fault at linear address %08x\n", subcode);
trap_dump (regs);
#endif
- assert(subcode < LINEAR_MIN_KERNEL_ADDRESS);
(void) vm_fault(thread->task->map,
trunc_page((vm_offset_t)subcode),
(regs->err & T_PF_WRITE)
Jeroen Dekkers
--
Jabber supporter - http://www.jabber.org Jabber ID: jdekkers@jabber.org
Debian GNU supporter - http://www.debian.org http://www.gnu.org
IRC: jeroen@openprojects
pgpWGTvQn8kaP.pgp
Description: PGP signature
- %gs:0 thread pseudoregister in oskit-mach, Roland McGrath, 2002/04/07
- Re: %gs:0 thread pseudoregister in oskit-mach, Jeroen Dekkers, 2002/04/20
- Re: %gs:0 thread pseudoregister in oskit-mach, Roland McGrath, 2002/04/21
- Re: %gs:0 thread pseudoregister in oskit-mach, Jeroen Dekkers, 2002/04/23
- Re: %gs:0 thread pseudoregister in oskit-mach,
Jeroen Dekkers <=
- Re: %gs:0 thread pseudoregister in oskit-mach, Roland McGrath, 2002/04/23
- Re: %gs:0 thread pseudoregister in oskit-mach, Jeroen Dekkers, 2002/04/23
- Re: %gs:0 thread pseudoregister in oskit-mach, Roland McGrath, 2002/04/23
- Re: %gs:0 thread pseudoregister in oskit-mach, Jeroen Dekkers, 2002/04/23
- Re: %gs:0 thread pseudoregister in oskit-mach, Roland McGrath, 2002/04/23
- Re: %gs:0 thread pseudoregister in oskit-mach, Jeroen Dekkers, 2002/04/23
- Re: %gs:0 thread pseudoregister in oskit-mach, Roland McGrath, 2002/04/23
- Re: %gs:0 thread pseudoregister in oskit-mach, Roland McGrath, 2002/04/23