Skip to content

Commit 907cb5c

Browse files
leitaowilldeacon
authored andcommitted
arm64: remove CONFIG_VMAP_STACK checks from stacktrace overflow logic
With VMAP_STACK now always enabled on arm64, remove all CONFIG_VMAP_STACK conditionals from overflow stack handling in stacktrace code. This change unconditionally defines the per-CPU overflow_stack and stackinfo_get_overflow() helper in arch/arm64/include/asm/stacktrace.h, and always includes the overflow stack in the stack_info array in arch/arm64/kernel/stacktrace.c. Also, drop redundant CONFIG_VMAP_STACK checks from SDEI stack declarations. Signed-off-by: Breno Leitao <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent e5692bb commit 907cb5c

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

arch/arm64/include/asm/stacktrace.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ static inline bool on_task_stack(const struct task_struct *tsk,
5959

6060
#define on_thread_stack() (on_task_stack(current, current_stack_pointer, 1))
6161

62-
#ifdef CONFIG_VMAP_STACK
6362
DECLARE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack);
6463

6564
static inline struct stack_info stackinfo_get_overflow(void)
@@ -72,11 +71,8 @@ static inline struct stack_info stackinfo_get_overflow(void)
7271
.high = high,
7372
};
7473
}
75-
#else
76-
#define stackinfo_get_overflow() stackinfo_get_unknown()
77-
#endif
7874

79-
#if defined(CONFIG_ARM_SDE_INTERFACE) && defined(CONFIG_VMAP_STACK)
75+
#if defined(CONFIG_ARM_SDE_INTERFACE)
8076
DECLARE_PER_CPU(unsigned long *, sdei_stack_normal_ptr);
8177
DECLARE_PER_CPU(unsigned long *, sdei_stack_critical_ptr);
8278

arch/arm64/kernel/stacktrace.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,8 @@ kunwind_stack_walk(kunwind_consume_fn consume_state,
332332
struct stack_info stacks[] = {
333333
stackinfo_get_task(task),
334334
STACKINFO_CPU(irq),
335-
#if defined(CONFIG_VMAP_STACK)
336335
STACKINFO_CPU(overflow),
337-
#endif
338-
#if defined(CONFIG_VMAP_STACK) && defined(CONFIG_ARM_SDE_INTERFACE)
336+
#if defined(CONFIG_ARM_SDE_INTERFACE)
339337
STACKINFO_SDEI(normal),
340338
STACKINFO_SDEI(critical),
341339
#endif

0 commit comments

Comments
 (0)