2 ms·
> Also, today the segment-jumpimg far call still exists on modern AMD64 machines, and is how you cross “heaven's gate” to go between 32 bit and 64 bit execution
by jcranmer 6y ago
> Also, today the segment-jumpimg far call still exists on modern AMD64 machines, and is how you cross “heaven's gate” to go between 32 bit and 64 bit execution.
Addendum: this model only exists on Windows. On Unixes, programs are entirely 64-bit or entirely 32-bit, so there's no LDT setup to have a 32-bit segment in 64-bit code. And there's no syscall on x86-64 to let userspace muck with the LDT as there is on x86-32.
- jchw 6y agoHm? I don’t think this is true. It’s CS 0x23 and 0x33 just like on Windows, no? This is, afaik, how Wine WoW64 works. I cannot find a definitive source, but for ex: https://stackoverflow.com/questions/24113729/switch-from-32bit-mode-to-64-bit-long-mode-on-64bit-linux https://stackoverflow.com/questions/24113729/switch-from-32b... I also think on Linux the x86 syscalls using software interrupts will still work in a 64 bit process, too.