FreeRTOS-Kernel/portable/RVDS
Gaurav Aggarwal ea9c26f524 Use highest numbered MPU regions for kernel
ARMv7-M allows overlapping MPU regions. When 2 MPU regions overlap, the
MPU configuration of the higher numbered MPU region is applied. For
example, if a memory area is covered by 2 MPU regions 0 and 1, the
memory permissions for MPU region 1 are applied.

We use 5 MPU regions for kernel code and kernel data protections and
leave the remaining for the application writer. We were using lowest
numbered MPU regions (0-4) for kernel protections and leaving the
remaining for the application writer. The application writer could
configure those higher numbered MPU regions to override kernel
protections.

This commit changes the code to use highest numbered MPU regions for
kernel protections and leave the remaining for the application writer.
This ensures that the application writer cannot override kernel
protections.

We thank the SecLab team at Northeastern University for reporting this
issue.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2022-09-17 00:03:08 +05:30
..
ARM7_LPC21xx Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ARM_CA9 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ARM_CM0 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ARM_CM3 fix typo (#399) 2021-10-06 15:32:07 -07:00
ARM_CM4_MPU Use highest numbered MPU regions for kernel 2022-09-17 00:03:08 +05:30
ARM_CM4F fix typo (#399) 2021-10-06 15:32:07 -07:00
ARM_CM7 fix typo (#399) 2021-10-06 15:32:07 -07:00