Page 1 of 1

one data sel for kernel/user

Posted: Thu Aug 28, 2003 2:37 pm
by Adek336
When I think about it, it doesn't seem very risky, complex or anything to make the kernel use PL#0 data sel. I would have less selectors to manage. How do you think?

Cheers,
Adrian

Re:one data sel for kernel/user

Posted: Thu Aug 28, 2003 4:29 pm
by nullify
The kernel does typically use a PL#0 data selector. User space has a PL#3 data selector for purposes of protection.

Re:one data sel for kernel/user

Posted: Thu Aug 28, 2003 4:35 pm
by Adek336
What when I have paging and the data selectors have offset 0? User apps would have a PL#3 data sel, and kernel would also use it.

Cheers,
Adrian.

Re:one data sel for kernel/user

Posted: Thu Aug 28, 2003 5:10 pm
by nullify
I guess you could, but if you intend to have DS == SS, you should note that the kernel won't be able to use a PL#3 stack selector.

Re:one data sel for kernel/user

Posted: Thu Aug 28, 2003 7:28 pm
by Tim
If the kernel used a PL3 data selector, it couldn't write to its own memory. A PL3 data selector denies access to kernel memory.