-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
riscv: pmp: actually activate stack overflow protection during boot
Before this, stack protection would be effective only after switching to the first thread. Even before the first thread is created, the kernel init code uses the IRQ stack to set things up. Let's make sure this is safeguarded as well. This also fixes the incompatibility between CONFIG_RISCV_PMP and CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL, the later needing an exception call to switch to the first thread and exception code assuming stack guard is already set up in the PMP. Signed-off-by: Nicolas Pitre <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters