Skip to content
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 PACBTI examples #17

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AhmedIsmail02
Copy link
Contributor

@AhmedIsmail02 AhmedIsmail02 commented Oct 7, 2024

Description

This PR adds two examples (MPU and non-MPU variants) that demonstrate how the new Pointer Authentication and Branch Target Identification (PACBTI) along with the new MPU region attribute Privileged eXecute Never (PXN) security features can be used on Cortex-M85 processor.

The examples are based on Corstone-315 Ecosystem Fixed Virtual Platform (Arm Cortex-M85 CPU and Ethos-U65 NPU).

The examples are compatible with Arm Compiler For Embedded v.621 toolchain only. The support for GNU, and IAR toolchains is not yet enabled due to known issues.

Depends on FreeRTOS-Kernel PR!1147

Test Steps

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

AhmedIsmail02 and others added 4 commits October 7, 2024 15:37
This example is going to be replaced by a new
example where MPU PXN feature along with PACBTI
security feature would be demonstrated.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
Arm-Corstone-Platform-Bsp library is a Board support
package (BSP) library for Corstone-3xx family of target
platforms where it's implemented using the CMSIS-Driver
software API.

The Partner-Supported-Demos would benefit from this library
as it shall be consumed by examples demonstrated on Corstone-3xx
target platforms (ex. MPU PXN, and PACBTI example (to be added)).

This improvement prevents duplicating the contents of CMSIS
subdirectory for each example demonstrated on Corstone-3xx
target platforms.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
This example demonstrates how the new
Pointer Authentication and Branch Target Identification
(PACBTI) along with the new MPU region attribute
Privileged eXecute Never (PXN) security features
can be used on Cortex-M85 processor.

The example is based on Corstone-315 Ecosystem Fixed
Virtual Platform (Arm Cortex-M85 CPU and Ethos-U55 NPU).

The example consists of three main tasks
(prvPacTask , prvBtiTask, and prvPxnTask).
The prvPacTask , and prvBtiTask tasks job is to trigger
the UsageFault exception by mimicking ROP
(Return Oriented Programming), JOP (Jump Oriented Programming)
security exploit attacks. Whereas, the privileged prvPxnTask
job is to trigger the MemoryFault exception by executing an
instruction from an MPU region with Privileged eXecute Never
(PXN) attribute set.

The example is compatible with Arm Compiler For
Embedded toolchain only. The support for GNU, and
IAR toolchains is not yet enabled due to known issues.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
This example demonstrates how the new
Pointer Authentication and Branch Target Identification
(PACBTI)security feature can be used on Cortex-M85 processor.

The example is based on Corstone-315 Ecosystem Fixed
Virtual Platform (Arm Cortex-M85 CPU and Ethos-U65 NPU).

The example consists of two main tasks
(prvPacTask , and prvBtiTask).
The prvPacTask , and prvBtiTask tasks job is to trigger
the UsageFault exception by mimicking ROP
(Return Oriented Programming), JOP (Jump Oriented Programming)
security exploit attacks.

The example is compatible with Arm Compiler For
Embedded toolchain only. The support for GNU, and
IAR toolchains is not yet enabled due to known issues.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
@kstribrnAmzn
Copy link
Member

Would you like me to squash and merge or preserve the commits?

@urutva
Copy link
Contributor

urutva commented Oct 8, 2024

Thanks for the review @kstribrnAmzn. Preserve the commits please.
This example depends on FreeRTOS/FreeRTOS-Kernel#1147 kernel changes. I think it's better to wait for the kernel changes to be merged first and then merge this PR. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants