lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 063/207] x86: Increase exception stack sizes
    Date
    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 390fdd39e0e21..5a69eee673536 100644
    --- a/arch/x86/include/asm/page_64_types.h
    +++ b/arch/x86/include/asm/page_64_types.h
    @@ -19,7 +19,7 @@
    #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
    #define CURRENT_MASK (~(THREAD_SIZE - 1))

    -#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 DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1)
    --
    2.33.0


    \
     
     \ /
      Last update: 2021-11-24 13:22    [W:4.289 / U:0.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site