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

Re: Address space question



I'm using a method similar to switch, with iret. I found the problem, I
wasn't saving and restoring the segment selector registers in my page
fault handler.

I'm almost totally bug free at this point, except for a couple wierd ones
that crop up every now and then (could be concurrency bugs). One of them
crashes spectacularly and paints blue stripes of characters vertically on
the screen! Not at all sure how this is possible (I'm using VMware to test
my kernels).

cheers,
steve

*------------*
| Steve Muckle
| Electrical & Computer Engineering
| Carnegie Mellon University
|
| Visit http://smuckle.com today!
*------------*

On Mon, 8 Jul 2002, Gopalakrishnan Suresh wrote:

>
> On Wed, 3 Jul 2002, Stephen A Muckle wrote:
> > Anyhow, the problem I get sometimes is that when my scheduler goes and
> > lets a process continue running that was once interrupted, somehow the
> > DS and ES segment selectors are set to 0, even though I set them to
> > segments that span the entire address space at DPL 3 right before I
> > switch to the user process. Since my user processes do use data, they
> > promptly segfault (general protection fault).
>
> How do you accomplish the switch? The switching code in
> uvm/sproc/x86/sproc_switch.c seems to take special care to explicitly set
> the DS and ES when using the lret (with an artificial stack frame) to
> achieve the switch. And it seems to work.
>
> --suresh
>
>
>









References: