Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/include/param.h
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* I/O permission bitmap has a bit for each I/O port plus an additional | * I/O permission bitmap has a bit for each I/O port plus an additional | ||||
* byte at the end with all bits set. See section "I/O Permission Bit Map" | * byte at the end with all bits set. See section "I/O Permission Bit Map" | ||||
* in the Intel SDM for more details. | * in the Intel SDM for more details. | ||||
*/ | */ | ||||
#define IOPERM_BITMAP_SIZE (IOPAGES * PAGE_SIZE + 1) | #define IOPERM_BITMAP_SIZE (IOPAGES * PAGE_SIZE + 1) | ||||
#ifndef KSTACK_PAGES | #ifndef KSTACK_PAGES | ||||
#ifdef KASAN | |||||
#define KSTACK_PAGES 6 | |||||
andrew: Why do we need more pages for `KASAN`? | |||||
Done Inline ActionsSome of the ASAN options seem to increase stack usage rather substantially. I was able to trigger a double fault with ZFS due to a stack overflow with 4 kstack pages. markj: Some of the ASAN options seem to increase stack usage rather substantially. I was able to… | |||||
#else | |||||
#define KSTACK_PAGES 4 /* pages of kstack (with pcb) */ | #define KSTACK_PAGES 4 /* pages of kstack (with pcb) */ | ||||
#endif | |||||
#endif | #endif | ||||
#define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ | #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ | ||||
/* | /* | ||||
* Mach derived conversion macros | * Mach derived conversion macros | ||||
*/ | */ | ||||
#define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) | #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) | ||||
#define trunc_page(x) ((unsigned long)(x) & ~(PAGE_MASK)) | #define trunc_page(x) ((unsigned long)(x) & ~(PAGE_MASK)) | ||||
Show All 20 Lines |
Why do we need more pages for KASAN?