x86/entry: Remove DBn stacks
Both #DB itself, as all other IST users (NMI, #MC) now clear DR7 on entry. Combined with not allowing breakpoints on entry/noinstr/NOKPROBE text and no single step (EFLAGS.TF) inside the #DB handler should guarantee no nested #DB. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200529213321.303027161@infradead.org
This commit is contained in:

committed by
Thomas Gleixner

parent
f9912ada82
commit
fd501d4f03
@@ -22,15 +22,13 @@
|
||||
static const char * const exception_stack_names[] = {
|
||||
[ ESTACK_DF ] = "#DF",
|
||||
[ ESTACK_NMI ] = "NMI",
|
||||
[ ESTACK_DB2 ] = "#DB2",
|
||||
[ ESTACK_DB1 ] = "#DB1",
|
||||
[ ESTACK_DB ] = "#DB",
|
||||
[ ESTACK_MCE ] = "#MC",
|
||||
};
|
||||
|
||||
const char *stack_type_name(enum stack_type type)
|
||||
{
|
||||
BUILD_BUG_ON(N_EXCEPTION_STACKS != 6);
|
||||
BUILD_BUG_ON(N_EXCEPTION_STACKS != 4);
|
||||
|
||||
if (type == STACK_TYPE_IRQ)
|
||||
return "IRQ";
|
||||
@@ -79,7 +77,6 @@ static const
|
||||
struct estack_pages estack_pages[CEA_ESTACK_PAGES] ____cacheline_aligned = {
|
||||
EPAGERANGE(DF),
|
||||
EPAGERANGE(NMI),
|
||||
EPAGERANGE(DB1),
|
||||
EPAGERANGE(DB),
|
||||
EPAGERANGE(MCE),
|
||||
};
|
||||
@@ -91,7 +88,7 @@ static bool in_exception_stack(unsigned long *stack, struct stack_info *info)
|
||||
struct pt_regs *regs;
|
||||
unsigned int k;
|
||||
|
||||
BUILD_BUG_ON(N_EXCEPTION_STACKS != 6);
|
||||
BUILD_BUG_ON(N_EXCEPTION_STACKS != 4);
|
||||
|
||||
begin = (unsigned long)__this_cpu_read(cea_exception_stacks);
|
||||
/*
|
||||
|
Reference in New Issue
Block a user