ENABLE_IBRS
STUFF_RSB
- CLEAR_R8_TO_R15
-
/*
* SYSENTER doesn't filter flags, so we need to clear NT and AC
* ourselves. To save a few cycles, we can check whether
pushq $0 /* pt_regs->r11 = 0 */
pushq %rbx /* pt_regs->rbx */
pushq %rbp /* pt_regs->rbp (will be overwritten) */
- pushq %r12 /* pt_regs->r12 */
- pushq %r13 /* pt_regs->r13 */
- pushq %r14 /* pt_regs->r14 */
- pushq %r15 /* pt_regs->r15 */
-
- CLEAR_R8_TO_R15
+ pushq $0 /* pt_regs->r12 = 0 */
+ pushq $0 /* pt_regs->r13 = 0 */
+ pushq $0 /* pt_regs->r14 = 0 */
+ pushq $0 /* pt_regs->r15 = 0 */
STUFF_RSB
/* Opportunistic SYSRET */
sysret32_from_system_call:
TRACE_IRQS_ON /* User mode traces as IRQs on. */
- movq R15(%rsp), %r15 /* pt_regs->r15 */
- movq R14(%rsp), %r14 /* pt_regs->r14 */
- movq R13(%rsp), %r13 /* pt_regs->r13 */
- movq R12(%rsp), %r12 /* pt_regs->r12 */
movq RBX(%rsp), %rbx /* pt_regs->rbx */
movq RBP(%rsp), %rbp /* pt_regs->rbp */
movq EFLAGS(%rsp), %r11 /* pt_regs->flags (in r11) */
ENABLE_IBRS
STUFF_RSB
- CLEAR_R8_TO_R15
-
/*
* User mode is traced as though IRQs are on, and the interrupt
* gate turned them off.