我想在 Linux x86_64 服务器上模拟 iret 条件。
我发现有三个指令
我无法分辨它们的区别,以及使用哪一种。
感谢任何人的帮助!!
我还有一个关于模拟 iret 的问题,你可以看看吗?http://stackoverflow.com/questions/11756274/how-to-simulate-a-iret-on-linux-x86-64
最佳答案
从这里 link :
IRET returns from an interrupt (hardware or software) by means of popping IP (or EIP), CS, and the flags off the stack and then continuing execution from the new CS:IP.
IRETW pops IP, CS and the flags as 2 bytes each, taking 6 bytes off the stack in total. IRETD pops EIP as 4 bytes, pops a further 4 bytes of which the top two are discarded and the bottom two go into CS, and pops the flags as 4 bytes as well, taking 12 bytes off the stack.
IRET is a shorthand for either IRETW or IRETD, depending on the default BITS setting at the time.
IRETQ 也非常相似
关于assembly - iret 和 iretd,iretq 和有什么不一样?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11756153/