FreeRTOS-Kernel/portable/GCC
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_AT91FR40008 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ARM7_AT91SAM7S Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ARM7_LPC23xx Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ARM7_LPC2000 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ARM_CA9 Include string.h at the top of portable/GCC/ARM_CA9/port.c to prevent memset() generating a warning. (#430) 2022-08-09 10:37:24 -07:00
ARM_CA53_64_BIT fix alignment exception for ullPortInterruptNesting. (#317) 2021-12-29 13:53:10 -07:00
ARM_CA53_64_BIT_SRE Update comments for the ARM_CA53_64_BIT_SRE port (#403) 2021-10-16 13:45:03 -07:00
ARM_CM0 Add configSYSTICK_CLOCK_HZ to Cortex-M0 ports (#484) 2022-04-08 11:13:11 -07:00
ARM_CM3 fix typo (#399) 2021-10-06 15:32:07 -07:00
ARM_CM3_MPU Use highest numbered MPU regions for kernel 2022-09-17 00:03:08 +05:30
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 Add Cortex M7 r0p1 Errata 837070 workaround to CM4_MPU ports (#513) 2022-06-30 10:35:26 +05:30
ARM_CM23 Add .syntax unified to GCC assembly functions (#538) 2022-08-07 22:46:11 +05:30
ARM_CM23_NTZ/non_secure Add .syntax unified to GCC assembly functions (#538) 2022-08-07 22:46:11 +05:30
ARM_CM33 Add .syntax unified to GCC assembly functions (#538) 2022-08-07 22:46:11 +05:30
ARM_CM33_NTZ/non_secure Add .syntax unified to GCC assembly functions (#538) 2022-08-07 22:46:11 +05:30
ARM_CM55 Add .syntax unified to GCC assembly functions (#538) 2022-08-07 22:46:11 +05:30
ARM_CM55_NTZ/non_secure Add .syntax unified to GCC assembly functions (#538) 2022-08-07 22:46:11 +05:30
ARM_CM85 M85 support (#556) 2022-09-13 22:08:25 +05:30
ARM_CM85_NTZ/non_secure M85 support (#556) 2022-09-13 22:08:25 +05:30
ARM_CR5 fix typo (#399) 2021-10-06 15:32:07 -07:00
ARM_CRx_No_GIC Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ATMega323 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
AVR32_UC3 Update license text for ports that were previously missed. 2021-05-27 19:57:55 -07:00
AVR_AVRDx Remove AVR ports from main repo (#394) 2021-09-14 19:25:46 -07:00
AVR_Mega0 Remove AVR ports from main repo (#394) 2021-09-14 19:25:46 -07:00
ColdFire_V2 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
CORTUS_APS3 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
H8S2329 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
HCS12 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
IA32_flat Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
MCF5235 Replace two dashes and one whitespace with their corresponding ASCII characters. (#362) 2021-06-30 15:07:55 -07:00
MicroBlaze Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
MicroBlazeV8 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
MicroBlazeV9 Add vPortRemoveInterruptHandler API (#533) 2022-08-03 13:45:27 -07:00
MSP430F449 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
NiosII Fix: Interrut Handler Register Function and Exception Process (#41) 2021-12-28 10:54:23 -07:00
PPC405_Xilinx Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
PPC440_Xilinx Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
RISC-V RISC-V: Add support for RV32E extension in GCC port (#543) 2022-08-30 16:49:37 -07:00
RL78 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
RX100 Fix GCC/RX100 function naming error. (#440) 2022-01-13 10:30:26 -08:00
RX200 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
RX600 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
RX600v2 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
RX700v3_DPFPU Add SPDX-License-Identifier: MIT to MIT licensed files. 2021-05-27 19:57:55 -07:00
STR75x Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
TriCore_1782 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00