> Linus> For example, the mapping of the kernel LDT into user space
> Linus> with the emumodule stuff. That is so stupid that it makes a
> Linus> grown man cry..
>
> It's a way to save 64k of memory per vm86 process, that's all. I think
^^^^^^^
No, memory saving was not the reason (though we profit from it),
it was needed because some DPMI-clients check the A (accessed-bit)
in the descriptor. This bit never changes in the userspace _copy_ of
the LDT. Some DPMI clients use the LAR instruction, others access this
bit in the LDT directly.
To make it clear, the user space mapped readonly kernel LDT is _not_ a
security hole at all. ^^^^^^^^
Not having access to the _real_ LDT is a problem for the above DPMI clients.
We could solve it by _not_ having present the userspace LDT,
hence catching _all_ accesses to the LDT and delivering the appropriate
entry via modify_ldt syscall. However, this will hurt performance a lot.
( ... as we will abandon emumodule, we will end up using this ... )
Hans
<lermen@fgan.de>