one data sel for kernel/user

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Adek336

one data sel for kernel/user

Post 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
nullify

Re:one data sel for kernel/user

Post by nullify »

The kernel does typically use a PL#0 data selector. User space has a PL#3 data selector for purposes of protection.
Adek336

Re:one data sel for kernel/user

Post 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.
nullify

Re:one data sel for kernel/user

Post 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.
Tim

Re:one data sel for kernel/user

Post 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.
Post Reply