IST-shift code is removed from entry code, #DB will not
at DB1 stack. So we remove the check of DB1 stack in
is_debug_stack().

Cc: Andy Lutomirski <l...@kernel.org>
Cc: Peter Zijlstra (Intel) <pet...@infradead.org>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: x...@kernel.org
Signed-off-by: Lai Jiangshan <la...@linux.alibaba.com>
---
 arch/x86/kernel/nmi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 1c58454ac5fb..2f463f5880c6 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -500,15 +500,10 @@ static noinstr bool is_debug_stack(unsigned long addr)
 {
        struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
        unsigned long top = CEA_ESTACK_TOP(cs, DB);
-       unsigned long bot = CEA_ESTACK_BOT(cs, DB1);
+       unsigned long bot = CEA_ESTACK_BOT(cs, DB);
 
        if (__this_cpu_read(debug_stack_usage))
                return true;
-       /*
-        * Note, this covers the guard page between DB and DB1 as well to
-        * avoid two checks. But by all means @addr can never point into
-        * the guard page.
-        */
        return addr >= bot && addr < top;
 }
 #endif
-- 
2.20.1

Reply via email to