IRET can restore registers from the stack, including EFLAGS, ESP, EIP, etc., but we can also restore registers ourselves. For example, "movl" can be used to restore the% esp register, "jmp" can move the address specified in EIP, which is stored on the stack.
The linux kernel returns from all interrupts using IRET, which is a weight instruction.
Some kernel operations (such as context switches) occur frequently.
Isn't IRET wasted?
source
share