CMSIS_5 icon indicating copy to clipboard operation
CMSIS_5 copied to clipboard

Stack sealing for TrustZone context

Open kjassmann-renesas opened this issue 4 years ago • 5 comments

Fixes #1034

kjassmann-renesas avatar Nov 10 '20 19:11 kjassmann-renesas

@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?

JonatanAntoni avatar Nov 11 '20 08:11 JonatanAntoni

@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.

ghost avatar Nov 11 '20 09:11 ghost

@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

JonatanAntoni avatar Jan 11 '21 15:01 JonatanAntoni

@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.

kjassmann-renesas avatar Jan 11 '21 22:01 kjassmann-renesas

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

JonatanAntoni avatar Jun 08 '21 15:06 JonatanAntoni