lkml.org 
[lkml]   [2020]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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();
}

/**
\
 
 \ /
  Last update: 2020-02-26 00:27    [W:0.144 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site