x86: make guard pages ro instead of non-present
Has the same effect of catching stack overflows, but makes debugging with GDB simpler since we won't get errors when inspecting such regions. Making these areas non-present was more than we needed, read-only is sufficient. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
7fae2bbc18
commit
76310f6896
2 changed files with 7 additions and 11 deletions
|
@ -49,7 +49,7 @@ static inline void kernel_arch_init(void)
|
|||
#endif
|
||||
#if CONFIG_X86_STACK_PROTECTION
|
||||
z_x86_mmu_set_flags(&z_x86_kernel_pdpt, _interrupt_stack, MMU_PAGE_SIZE,
|
||||
MMU_ENTRY_NOT_PRESENT, MMU_PTE_P_MASK);
|
||||
MMU_ENTRY_READ, MMU_PTE_RW_MASK);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue