Messages in this thread Patch in this message | | | Date | Tue, 25 Feb 2020 23:33:37 +0100 | From | Thomas Gleixner <> | Subject | [patch 16/16] x86/entry: Disable interrupts in IDTENTRY |
| |
Not all exceptions guarantee to return with interrupts disabled. Disable them in idtentry_exit() which is invoked on all regular (non IST) exception entry points. Preparatory patch for further consolidation of the return code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- arch/x86/entry/entry_64.S | 3 +-- arch/x86/include/asm/idtentry.h | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-)
--- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1336,8 +1336,7 @@ SYM_CODE_END(error_entry) SYM_CODE_START_LOCAL(error_exit) UNWIND_HINT_REGS - DISABLE_INTERRUPTS(CLBR_ANY) - TRACE_IRQS_OFF + DEBUG_ENTRY_ASSERT_IRQS_OFF testb $3, CS(%rsp) jz retint_kernel jmp .Lretint_user --- a/arch/x86/include/asm/idtentry.h +++ b/arch/x86/include/asm/idtentry.h @@ -37,10 +37,11 @@ static __always_inline void idtentry_ent /** * idtentry_exit - Prepare returning to low level ASM code * - * Place holder for now. + * Disables interrupts before returning */ static __always_inline void idtentry_exit(struct pt_regs *regs) { + local_irq_disable(); } /**
| |