36 ms·
Bringing Call Gates Back
- yuhong 9y agoThe fun thing is that I found out that these 64-bit call gates are rarely used. Because it does not disable interrupts for example. Back when AMD was developing x86-64, they were probably focusing on Linux which did not use call gates.
- dfox 9y agoThe fact that call gates does not disable interrupts is usually the desired behavior. Linux (and NT for 32 bit code) does not use call gates because they are not that useful for OSes that target the Unix/C flat memory model. You can probably use call gates to implement particularly fast IPC mechanism with semantics similar to QNX's message passing. But probably only real users of call gates are DOS extenders and 32 bit windows for 32/16b thunking (which is to large extent the same use case of mixing 32/16b code in single process).
- brian_herman 9y agoI initially thought this had something to do with Bill Gates and Windows. But it just has to do with Windows.
- j_s 9y agoSeeing this 2010-era (per the referenced doc) vulnerability silently mitigated triggers my spidey sense re: a pending Shadowbrokers leak...
- amluto 9y ago64-bit call gates may well be useless, but the corresponding return instruction (LRETQ or whatever you want to call it) can be useful. I have prototype Linux code to use it instead of IRET, and it's considerably faster.
- aionescu 9y agoGot some numbers/public information? Would love to know more.
- amluto 9y agoMy old prototype is here: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/lret-to-userspace&id=05ce2ed5b8a1fc4465114000f222d0c60bf5ddaf https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.g...