mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
riscv: Increase stack size under KASAN
KASAN requires more stack space because of compiler instrumentation.
Increase stack size as other arches do.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Reported-by: syzbot+0600986d88e2d4d7ebb8@syzkaller.appspotmail.com
Fixes: 8ad8b72721
("riscv: Add KASAN support")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
2b2b574ac5
commit
b81d591386
1 changed files with 8 additions and 2 deletions
|
@ -11,11 +11,17 @@
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <linux/const.h>
|
#include <linux/const.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_KASAN
|
||||||
|
#define KASAN_STACK_ORDER 1
|
||||||
|
#else
|
||||||
|
#define KASAN_STACK_ORDER 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* thread information allocation */
|
/* thread information allocation */
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
#define THREAD_SIZE_ORDER (2)
|
#define THREAD_SIZE_ORDER (2 + KASAN_STACK_ORDER)
|
||||||
#else
|
#else
|
||||||
#define THREAD_SIZE_ORDER (1)
|
#define THREAD_SIZE_ORDER (1 + KASAN_STACK_ORDER)
|
||||||
#endif
|
#endif
|
||||||
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
|
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue