[Prev][Next][Index][Thread]
Re: Address space question
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
Follow-Ups:
References: