4 ms·
> * There's some legacy cruft (e.g., segment management) that's generally unused by anyone not in 16-bit mode. OpenBSD uses segments(while in protected mode!)
by dmm 10y ago
> * There's some legacy cruft (e.g., segment management) that's generally unused by anyone not in 16-bit mode.
OpenBSD uses segments(while in protected mode!) to implement a line-in-the-sand W^X implementation on i386 systems that don't support anything better. The segment is set just high enough in a processes space to cover the text and libraries but leave the heap and stack unexecutable.
This mentions this implementation: http://www.tedunangst.com/flak/post/now-or-never-exec http://www.tedunangst.com/flak/post/now-or-never-exec
- userbinator 10y agoVMware also uses(used?) segments to hide its hypervisor: http://www.pagetable.com/?p=25 http://www.pagetable.com/?p=25
- kijiki 10y agoUsed. AMD64 removed segment limit checking. Base offsets are still applied for %fs and %gs, but not other segment registers. We got them to add a flag to re-enable it (and SAHF), but Intel never had it. Nowadays it is all Vanderpool/Pacifica, aka VT-x/AMD-V.