| e3458e03 | 26-Mar-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: introduce CFG_TA_BIGNUM_MAX_BITS
Make the size of big numbers in libutee configurable. This controls the size of the big numbers that can be manipulated through the TEE Internal Core API (A
libutee: introduce CFG_TA_BIGNUM_MAX_BITS
Make the size of big numbers in libutee configurable. This controls the size of the big numbers that can be manipulated through the TEE Internal Core API (Arithmetical functions).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d5d50c3c | 27-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Fix USER_TA_PROP_TYPE_BOOL handling
In 'ta_props' in ta/arch/arm/user_ta_header.c properties tagged as USER_TA_PROP_TYPE_BOOL are assigned a pointer to a bool, but is in the rest of the code handled
Fix USER_TA_PROP_TYPE_BOOL handling
In 'ta_props' in ta/arch/arm/user_ta_header.c properties tagged as USER_TA_PROP_TYPE_BOOL are assigned a pointer to a bool, but is in the rest of the code handled as if it was a pointer to a uint32_t. This works as long as a bool is four bytes, with certain compilers the size of a `bool` is 1 instead leading to errors.
TA properties can be supplied via the define TA_CURRENT_TA_EXT_PROPERTIES. The pattern used in ta/arch/arm/user_ta_header.c is likely copied when assigning properties via TA_CURRENT_TA_EXT_PROPERTIES.
This patch is fixing the assumption that the size of a `bool` is the same as the size of a `uint32_t` by changing all handling of USER_TA_PROP_TYPE_BOOL to base it on the type `bool` instead of `uint32_t`.
Reviewed-by: Jianhui Li <airbak.li@hisilicon.com> Tested by: Jianhui Li <airbak.li@hisilicon.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b7ea03ff | 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: fix TA_CreateEntryPoint() and TA_DestroyEntryPoint()
Fixes issues observed with keep alive single instance TAs: - TA_CreateEntryPoint() must only be called once, - TA_DestroyEntryPoint() mu
libutee: fix TA_CreateEntryPoint() and TA_DestroyEntryPoint()
Fixes issues observed with keep alive single instance TAs: - TA_CreateEntryPoint() must only be called once, - TA_DestroyEntryPoint() must not be called when the last session is closed, because the instance is still alive.
While we're at it, simplify the code a bit by not using a separate variable (ta_ref_count) to track whether we have sessions or not. Simply use TAILQ_EMPTY() on the session queue instead.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Kevin Peng <kevinp@marvell.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 0e1c6e8e | 29-Sep-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Dump call stack on TA panic
Adds support for dumping the call stack of a user-mode TA when it panics. Stack unwinding happens in kernel mode by re-using abort_print_error() in core/arch/arm/kernel/a
Dump call stack on TA panic
Adds support for dumping the call stack of a user-mode TA when it panics. Stack unwinding happens in kernel mode by re-using abort_print_error() in core/arch/arm/kernel/abort.c. Like for abort dumps, the helper script scripts/symbolize.py may be used to obtain source-level information.
This feature is enabled by default. Set CFG_UNWIND=n to disable it (or CFG_TEE_CORE_DEBUG=n).
In libutee, the utee_panic() syscall wrapper is renamed __utee_panic() and now takes an additional parameters: a stack pointer, in addition to the panic code. utee_panic() is written in assembly and pushes some registers onto the stack before calling __utee_panic(). When it is time to return from syscall_panic(), tee_svc_sys_return_helper() uses the stack pointer to get the information needed to unwind the TA stack. A struct abort_info is created and abort_print_error() is called.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMUv8)
show more ...
|
| 6246cc9d | 21-Aug-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: puts(): add trailing newline
puts() should print the supplied string and a trailing newline. Fix it accordingly.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by:
libutee: puts(): add trailing newline
puts() should print the supplied string and a trailing newline. Fix it accordingly.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b0c596ac | 21-Aug-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: printf(): remove prefix and other non-standard behavior
Our implementation of printf() does not comply with the standards, because it adds a prefix to the output and may print truncation ch
libutee: printf(): remove prefix and other non-standard behavior
Our implementation of printf() does not comply with the standards, because it adds a prefix to the output and may print truncation characters. By doing so it becomes inconsistent with puts(). It is a problem because the compiler has the ability to perform optimizations and, in some cases, may invoke puts() instead of printf().
Therefore, remove any output that is not strictly specified in the printf() parameters.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|