Skip to content

Commit

Permalink
arm32: unwind: mark tee_svc_do_call() with .cantunwind
Browse files Browse the repository at this point in the history
The assembly function tee_svc_do_call() manipulates the stack pointer
but does not use the proper unwind directives when doing so. As a
result, the compiler can't generate proper unwind information. This can
lead to crashes or infinite loops if unwinding is performed at runtime.
Given that there is nothing of much interest below this function, we
simply add a .cantundwind directive to stop unwinding here.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
jforissier authored and takuya-sakata committed Nov 2, 2017
1 parent fd39363 commit 7095dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/arch/arm/tee/arch_svc_a32.S
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
*/
FUNC tee_svc_do_call , :
UNWIND( .fnstart)
UNWIND( .cantunwind)
push {r5-r9, lr}
UNWIND( .save {r5-r9, lr})
mov r7, sp
mov r8, r0
mov r9, r1
Expand Down

0 comments on commit 7095dc8

Please sign in to comment.