]> begriffs open source - freertos/commit
ARMv8.1-M: Add task dedicated PAC key support (#1195)
authorAhmed Ismail <64546783+AhmedIsmail02@users.noreply.github.com>
Tue, 14 Jan 2025 05:20:52 +0000 (05:20 +0000)
committerGitHub <noreply@github.com>
Tue, 14 Jan 2025 05:20:52 +0000 (10:50 +0530)
commit78e0cc778ae01100ce7ca0eaf838567cd19f9720
tree6324f3bb79ea7c7f0199f9dbb5adbc31dd2c5300
parentc38427eea442b5a58b0b95ad88ff769be3abcc0d
ARMv8.1-M: Add task dedicated PAC key support (#1195)

armv8.1-m: Add task dedicated PAC key

To harden the security, each task is assigned a dedicated PAC key, so that attackers needs to guess the all the tasks' PAC keys right to exploit the system using Return Oriented Programming.

The kernel is now updated to support the following:
* A PAC key set with a random number generated and is saved in the task's context when a task is created.
* As part of scheduling, the task's PAC key is stored/restored to/from the task's context when a task is unscheduled/scheduled from/to run.

stack-overflow-check: Introduce portGET_CURRENT_TOP_OF_STACK macro

When MPU wrapper v2 is used, the task's context is stored in TCB and `pxTopOfStack`` member of TCB points to the context location in TCB. We, therefore, need to read PSP to find the task's current top of stack.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
87 files changed:
.github/.cSpellWords.txt
include/portable.h
include/stack_macros.h
portable/ARMv8M/non_secure/port.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portmacro.h
portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portmacro.h
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portmacro.h
portable/ARMv8M/non_secure/portable/GCC/ARM_CM35P/portmacro.h
portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portmacro.h
portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portmacro.h
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.s
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portmacro.h
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portasm.s
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portmacro.h
portable/ARMv8M/non_secure/portable/IAR/ARM_CM35P/portmacro.h
portable/ARMv8M/non_secure/portmacrocommon.h
portable/GCC/ARM_CM23/non_secure/port.c
portable/GCC/ARM_CM23/non_secure/portmacro.h
portable/GCC/ARM_CM23/non_secure/portmacrocommon.h
portable/GCC/ARM_CM23_NTZ/non_secure/port.c
portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h
portable/GCC/ARM_CM23_NTZ/non_secure/portmacrocommon.h
portable/GCC/ARM_CM33/non_secure/port.c
portable/GCC/ARM_CM33/non_secure/portasm.c
portable/GCC/ARM_CM33/non_secure/portmacro.h
portable/GCC/ARM_CM33/non_secure/portmacrocommon.h
portable/GCC/ARM_CM33_NTZ/non_secure/port.c
portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h
portable/GCC/ARM_CM33_NTZ/non_secure/portmacrocommon.h
portable/GCC/ARM_CM35P/non_secure/port.c
portable/GCC/ARM_CM35P/non_secure/portasm.c
portable/GCC/ARM_CM35P/non_secure/portmacro.h
portable/GCC/ARM_CM35P/non_secure/portmacrocommon.h
portable/GCC/ARM_CM35P_NTZ/non_secure/port.c
portable/GCC/ARM_CM35P_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM35P_NTZ/non_secure/portmacro.h
portable/GCC/ARM_CM35P_NTZ/non_secure/portmacrocommon.h
portable/GCC/ARM_CM55/non_secure/port.c
portable/GCC/ARM_CM55/non_secure/portasm.c
portable/GCC/ARM_CM55/non_secure/portmacrocommon.h
portable/GCC/ARM_CM55_NTZ/non_secure/port.c
portable/GCC/ARM_CM55_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM55_NTZ/non_secure/portmacrocommon.h
portable/GCC/ARM_CM85/non_secure/port.c
portable/GCC/ARM_CM85/non_secure/portasm.c
portable/GCC/ARM_CM85/non_secure/portmacrocommon.h
portable/GCC/ARM_CM85_NTZ/non_secure/port.c
portable/GCC/ARM_CM85_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM85_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM23/non_secure/port.c
portable/IAR/ARM_CM23/non_secure/portmacro.h
portable/IAR/ARM_CM23/non_secure/portmacrocommon.h
portable/IAR/ARM_CM23_NTZ/non_secure/port.c
portable/IAR/ARM_CM23_NTZ/non_secure/portmacro.h
portable/IAR/ARM_CM23_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM33/non_secure/port.c
portable/IAR/ARM_CM33/non_secure/portasm.s
portable/IAR/ARM_CM33/non_secure/portmacro.h
portable/IAR/ARM_CM33/non_secure/portmacrocommon.h
portable/IAR/ARM_CM33_NTZ/non_secure/port.c
portable/IAR/ARM_CM33_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h
portable/IAR/ARM_CM33_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM35P/non_secure/port.c
portable/IAR/ARM_CM35P/non_secure/portasm.s
portable/IAR/ARM_CM35P/non_secure/portmacro.h
portable/IAR/ARM_CM35P/non_secure/portmacrocommon.h
portable/IAR/ARM_CM35P_NTZ/non_secure/port.c
portable/IAR/ARM_CM35P_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM35P_NTZ/non_secure/portmacro.h
portable/IAR/ARM_CM35P_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM55/non_secure/port.c
portable/IAR/ARM_CM55/non_secure/portasm.s
portable/IAR/ARM_CM55/non_secure/portmacrocommon.h
portable/IAR/ARM_CM55_NTZ/non_secure/port.c
portable/IAR/ARM_CM55_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM55_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM85/non_secure/port.c
portable/IAR/ARM_CM85/non_secure/portasm.s
portable/IAR/ARM_CM85/non_secure/portmacrocommon.h
portable/IAR/ARM_CM85_NTZ/non_secure/port.c
portable/IAR/ARM_CM85_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM85_NTZ/non_secure/portmacrocommon.h