Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Stack sealing for TrustZone context#1037

Open
kjassmann-renesas wants to merge 1 commit into
ARM-software:developfrom
kjassmann-renesas:develop
Open

Stack sealing for TrustZone context#1037
kjassmann-renesas wants to merge 1 commit into
ARM-software:developfrom
kjassmann-renesas:develop

Conversation

@kjassmann-renesas

@kjassmann-renesas kjassmann-renesas commented Nov 10, 2020

Copy link
Copy Markdown

Fixes #1034

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are correct and add a ARMv8-M stack sealing value to each process stack.

@JonatanAntoni

Copy link
Copy Markdown
Member

@GuentherMartin, I was thinking if we rather should reuse the stack sealing functions we are planning to add into CMSIS-Core. This PR "duplicates" the sealing procedure into the trust zone template. Shall we wait until the functions are available in CMSIS-Core and refactor this patch accordingly?

@ghost

ghost commented Nov 11, 2020

Copy link
Copy Markdown

@JonatanAntoni, I would suggest to merge the pull request and replace the writing of the stack seal values with the appropriate CMSIS function later. As I see also the file headers in the tz_context.c files need to be adjusted.

@JonatanAntoni

Copy link
Copy Markdown
Member

@kjassmann-renesas,

We have now #1075 ready for being merged. This patch introduces a stack sealing function (and macros) into CMSIS-Core(M).

Do you think it makes sense to update your PR to use these macros/functions instead of defining it separately?`

Cheers,
Jonatan

@kjassmann-renesas

Copy link
Copy Markdown
Author

@JonatanAntoni, I agree we should use the new stack sealing function and macro for the seal size. Once that branch is building with IAR I can update this merge request.

@JonatanAntoni

Copy link
Copy Markdown
Member

@kjassmann-renesas, stack sealing functions have been added for IAR in 0a959c6. May I ask you to crosscheck and update this PR if possible?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stack Sealing in CMSIS/Core/Template/ARMv8-M/tz_context.c

2 participants