-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARMv8.1-M: Add task dedicated PAC key support #1195
Open
AhmedIsmail02
wants to merge
6
commits into
FreeRTOS:main
Choose a base branch
from
AhmedIsmail02:add-task-dedicated-pac-key-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
ARMv8.1-M: Add task dedicated PAC key support #1195
AhmedIsmail02
wants to merge
6
commits into
FreeRTOS:main
from
AhmedIsmail02:add-task-dedicated-pac-key-support
Conversation
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
Some declarations in portasm.h and FreeRTOS.h will cause build errors if it's not understood by the assembler. For example the 'extern' keyword. To avoid these errors guard any such code inside a #ifdef #endif block so the code is included in C files but excluded by the preprocessor in assembly files. Signed-off-by: Ahmed Ismail <[email protected]>
ARMv8-M TrustZone variant registers stacking procedure is modified to be consistent with the NTZ port variant where one `stmdb` instruction is used instead of using 'subs' instruction along with `stmia` instruction, also, this result in more efficient context switching handling (lower latency). Signed-off-by: Ahmed Ismail <[email protected]>
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 pushed onto the task's stack when a task is created. * As part of scheduling, the task's PAC key is stacked/unstacked to/from the task's stack when a task is unscheduled/scheduled from/to run. Signed-off-by: Ahmed Ismail <[email protected]>
AhmedIsmail02
force-pushed
the
add-task-dedicated-pac-key-support
branch
from
November 19, 2024 16:39
d7e9592
to
05a1578
Compare
urutva
approved these changes
Nov 19, 2024
Quality Gate passedIssues Measures |
Thank you for your contribution @AhmedIsmail02! I have reviewed the code and I have the following suggestions -
All of my suggestions are in the following patch - 0001-Code-review-suggestions.patch. Please take a look and let me know what you think. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
To harden the security, each task is assigned with a dedicated PAC key, so that attackers needs to get the all the PAC keys right to exploit the system using Return Oriented Programming. The kernel is updated to support the following:
Test Steps
Checklist:
Related Issue
Blocks FreeRTOS/FreeRTOS-Partner-Supported-Demos#19
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.