sysret
Return from operating system
Returns to user code from the operating system, as the counterpart of syscall for fast entry and exit.
x86-64 and later
CFPFAFZFSFTFIFDFOF ●●●●●●●●●
- ● set from the result
Forms
sysret
Only kernel code in 64-bit mode may run it; user code gets a fault.
The plain form returns to 32-bit compatibility-mode code using ecx, with cs from bits 63–48 of the STAR register. The 64-bit form (o64 sysret) returns to 64-bit code using all of rcx, with that selector plus 16. Either way ss is the selector plus 8, at privilege level 3.