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

TA stack protector fix #7049

Merged
merged 2 commits into from
Sep 25, 2024
Merged

TA stack protector fix #7049

merged 2 commits into from
Sep 25, 2024

Conversation

jforissier
Copy link
Contributor

No description provided.

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Acked-by: Etienne Carriere <[email protected]>

@jenswi-linaro
Copy link
Contributor

Acked-by: Jens Wiklander <[email protected]>

@jforissier
Copy link
Contributor Author

@maximus64 are you OK with this? Thanks.

@maximus64
Copy link
Contributor

Reviewed-by: Khoa Hoang <[email protected]>

Add the __no_stack_protector macro as an alias for
__attribute__((no_stack_protector)), which prevents the generation by
the compiler of the stack protection code.

Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Etienne Carriere <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
Reviewed-by: Khoa Hoang <[email protected]>
Apply the __no_stack_protector attribute to the first C function called
following the TA entry point (i.e., __ta_entry(), or for the special
case of ARM32, __ta_entry_c()). This is required because
__stack_chk_guard is initialized in this very function, therefore stack
protection cannot be assumed to be functional at this point.

Fixes a TA crash on QEMUv7 with Clang 18.1.7 [1].

Link: OP-TEE#7047 [1]
Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Etienne Carriere <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
Reviewed-by: Khoa Hoang <[email protected]>
@jforissier jforissier merged commit 19662e4 into OP-TEE:master Sep 25, 2024
8 checks passed
@jforissier jforissier deleted the stack-prot-fix branch September 25, 2024 13:46
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.

4 participants