Skip to content

Commit

Permalink
x86/entry/64: Trace irqflags unconditionally as ON when returning to …
Browse files Browse the repository at this point in the history
…user space

User space cannot disable interrupts any longer so trace return to user space
unconditionally as IRQS_ON.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Link: https://lkml.kernel.org/r/20200308222609.314596327@linutronix.de
  • Loading branch information
Thomas Gleixner committed Mar 10, 2020
1 parent 74a4882 commit 810f80a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/entry/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ SYM_FUNC_START(entry_INT80_32)
STACKLEAK_ERASE

restore_all:
TRACE_IRQS_IRET
TRACE_IRQS_ON
SWITCH_TO_ENTRY_STACK
CHECK_AND_APPLY_ESPFIX

Expand Down
4 changes: 2 additions & 2 deletions arch/x86/entry/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ SYM_INNER_LABEL(entry_SYSCALL_64_after_hwframe, SYM_L_GLOBAL)
movq %rsp, %rsi
call do_syscall_64 /* returns with IRQs disabled */

TRACE_IRQS_IRETQ /* we're about to change IF */
TRACE_IRQS_ON /* return enables interrupts */

/*
* Try to use SYSRET instead of IRET if we're returning to
Expand Down Expand Up @@ -619,7 +619,7 @@ ret_from_intr:
.Lretint_user:
mov %rsp,%rdi
call prepare_exit_to_usermode
TRACE_IRQS_IRETQ
TRACE_IRQS_ON

SYM_INNER_LABEL(swapgs_restore_regs_and_return_to_usermode, SYM_L_GLOBAL)
#ifdef CONFIG_DEBUG_ENTRY
Expand Down

0 comments on commit 810f80a

Please sign in to comment.