tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: UVM and the NULL page
>> Perhaps it's time to implement null pointers as something other than
>> all-bits-zero?
> Wouldn't help much; the next obvious (probably only viable) candidate
> is all-bits-1 and then you just need a slightly larger offset from it
> to jump to userspace.
Depends on the architecture. For example, on the VAX, I would say
c0000000 and e0000000 would be prime candidates, because the high
quarter of the possible address space is permanently reserved.
Machines with ring-based addressing architectures (does NetBSD run on
any such?) might have a ring that's ideal for the purpose.
> Userspace memory shouldn't have supervisor execute permission anyway,
> although I suppose x86 can't represent that.
Architecture-specific, again. For example, the VAX cannot handle that
either; anything one access mode can do with memory, any more
privileged access mode can also do. To implement this, you'd have to
change P0 and P1 mappings on entry to kernel mode - and then take
special measures, like walking page tables manually, whenever the
kernel wants to access user memory.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index