File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -599,6 +599,16 @@ config IRQ_STACKS
599
599
Add independent irq & softirq stacks for percpu to prevent kernel stack
600
600
overflows. We may save some memory footprint by disabling IRQ_STACKS.
601
601
602
+ config THREAD_SIZE_ORDER
603
+ int "Kernel stack size (in power-of-two numbers of page size)" if VMAP_STACK && EXPERT
604
+ range 0 4
605
+ default 1 if 32BIT && !KASAN
606
+ default 3 if 64BIT && KASAN
607
+ default 2
608
+ help
609
+ Specify the Pages of thread stack size (from 4KB to 64KB), which also
610
+ affects irq stack size, which is equal to thread stack size.
611
+
602
612
endmenu # "Platform type"
603
613
604
614
menu "Kernel features"
Original file line number Diff line number Diff line change 11
11
#include <asm/page.h>
12
12
#include <linux/const.h>
13
13
14
- #ifdef CONFIG_KASAN
15
- #define KASAN_STACK_ORDER 1
16
- #else
17
- #define KASAN_STACK_ORDER 0
18
- #endif
19
-
20
14
/* thread information allocation */
21
- #ifdef CONFIG_64BIT
22
- #define THREAD_SIZE_ORDER (2 + KASAN_STACK_ORDER)
23
- #else
24
- #define THREAD_SIZE_ORDER (1 + KASAN_STACK_ORDER)
25
- #endif
15
+ #define THREAD_SIZE_ORDER CONFIG_THREAD_SIZE_ORDER
26
16
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
27
17
28
18
/*
You can’t perform that action at this time.
0 commit comments