| From ac7aede7ae0df1c45aacc569498ec70fb8901989 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Wed, 15 Sep 2021 16:19:46 +0200 |
| Subject: x86: Increase exception stack sizes |
| |
| From: Peter Zijlstra <peterz@infradead.org> |
| |
| [ Upstream commit 7fae4c24a2b84a66c7be399727aca11e7a888462 ] |
| |
| It turns out that a single page of stack is trivial to overflow with |
| all the tracing gunk enabled. Raise the exception stacks to 2 pages, |
| which is still half the interrupt stacks, which are at 4 pages. |
| |
| Reported-by: Michael Wang <yun.wang@linux.alibaba.com> |
| Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> |
| Link: https://lkml.kernel.org/r/YUIO9Ye98S5Eb68w@hirez.programming.kicks-ass.net |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| arch/x86/include/asm/page_64_types.h | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h |
| index 288b065955b72..9d0b479452720 100644 |
| --- a/arch/x86/include/asm/page_64_types.h |
| +++ b/arch/x86/include/asm/page_64_types.h |
| @@ -15,7 +15,7 @@ |
| #define THREAD_SIZE_ORDER (2 + KASAN_STACK_ORDER) |
| #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) |
| |
| -#define EXCEPTION_STACK_ORDER (0 + KASAN_STACK_ORDER) |
| +#define EXCEPTION_STACK_ORDER (1 + KASAN_STACK_ORDER) |
| #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) |
| |
| #define IRQ_STACK_ORDER (2 + KASAN_STACK_ORDER) |
| -- |
| 2.33.0 |
| |