| 0fe671d3 | 24-May-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
trace: get thread_id right in print_thread_id()
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> |
| a920a741 | 24-May-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
trace: check for CFG_MSG_LONG_PREFIX_MASK only once per message
There is no need for repeated checks for every portion of extended prefix.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
trace: check for CFG_MSG_LONG_PREFIX_MASK only once per message
There is no need for repeated checks for every portion of extended prefix.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 64fad262 | 23-May-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
trace: print core id if in atomic context
If (D|E|I|F)MSG is called with foreign interrupts masked we can report core ID. "?" will be printed instead, if foreign interrupts aren't masked.
With this
trace: print core id if in atomic context
If (D|E|I|F)MSG is called with foreign interrupts masked we can report core ID. "?" will be printed instead, if foreign interrupts aren't masked.
With this patch log looks like this:
D/TC:2 0 core_mmu_set_user_map:940 0xe181b88 0xeee8003 D/TC:? 0 __wq_rpc:40 wake thread 1 0xe16f028 -3 D/TC:1 thread_handle_std_smc:612 a7: 2 D/TC:3 0 core_mmu_set_user_map:940 0x0 0x0
Where first digit shows core id and second - thread id.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 8a076f79 | 20-Jun-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Use inttypes.h over stdint.h on some .h files
Uses inttypes.h over stdint.h on some .h files to be nice to U-boot.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wikla
Use inttypes.h over stdint.h on some .h files
Uses inttypes.h over stdint.h on some .h files to be nice to U-boot.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0135712b | 02-Feb-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
bget: remove unused parameter for bufdump()
bufdump() function does not need poolset to work
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@li
bget: remove unused parameter for bufdump()
bufdump() function does not need poolset to work
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cf1dc544 | 27-Jun-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: introduce MAX_UNSAFE() and MIN_UNSAFE()
This change allows one to use MAX_UNSAFE() and MIN_UNSAFE() macros in particular conditions where MAX()/MIN() macros fail to build from C source fil
libutils: introduce MAX_UNSAFE() and MIN_UNSAFE()
This change allows one to use MAX_UNSAFE() and MIN_UNSAFE() macros in particular conditions where MAX()/MIN() macros fail to build from C source file implementation with error traces as below:
In file included from core/arch/arm/include/arm.h:8:0, from core/arch/arm/include/kernel/thread.h:11, from core/arch/arm/kernel/asm-defines.c:7: lib/libutils/ext/include/util.h:24:16: error: missing binary operator before token "(" (__extension__({ __typeof__(a) _a = (a); \ ^ core/arch/arm/plat-stm/./platform_config.h:190:25: note: in expansion of macro ‘MAX’ #define STM_SECDDR_END MAX(TZSRAM_BASE + TZSRAM_SIZE, \ ^~~ core/arch/arm/plat-stm/./platform_config.h:204:6: note: in expansion of macro ‘STM_SECDDR_END’ #if (STM_SECDDR_END < 0x80000000ULL) ^~~~~~~~~~~~~~ make: *** [out/core/include/generated/.asm-defines.s] Error 1
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2d8739bd | 03-Jan-2018 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
benchmark: change the way of timestamp buffer allocation.
In case if timestamp buffer is allocated in userspace and new register user memory API is used for its registering in OP-TEE (introduced in
benchmark: change the way of timestamp buffer allocation.
In case if timestamp buffer is allocated in userspace and new register user memory API is used for its registering in OP-TEE (introduced in optee_client commit 27888d73d156 ("tee_client_api: register user memory")), there is no possibility to keep this mapping permanent among different TEEC_InvokeCommand invocations, as all SHM are automatically unmapped from OP-TEE VA space after TEEC_InvokeCommand is handled by OP-TEE.
Timestamp buffer is now allocated with thread_rpc_alloc_global_payload().
Fixes: https://github.com/OP-TEE/optee_os/issues/1979 Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|
| 249c24a3 | 14-Jun-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
libmpa: remove mpa_set_random_generator()
MPA is used in two configurations, either in kernel mode or in user mode.
In kernel mode random is always drawn with crypto_rng_read() and in user mode ute
libmpa: remove mpa_set_random_generator()
MPA is used in two configurations, either in kernel mode or in user mode.
In kernel mode random is always drawn with crypto_rng_read() and in user mode utee_cryp_random_number_generate() is used instead.
This patch makes the code easier to follow by replacing the call via a function pointer to a normal function call instead.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 746dcfb5 | 05-Jun-2018 |
Andrew Gabbasov <andrew_gabbasov@mentor.com> |
libutee: Fix the keepalive condition on last session close
Keepalive condition check should involve single instance flag too, since the keepalive flag is meaningless if the TA is not single instance
libutee: Fix the keepalive condition on last session close
Keepalive condition check should involve single instance flag too, since the keepalive flag is meaningless if the TA is not single instance. The same fix was done earlier in the core by commit f9a64f12b542 ("core: fix the keepalive condition in close session").
Fixes: b7ea03ff2963 ("libutee: fix TA_CreateEntryPoint() and TA_DestroyEntryPoint()") Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d6b53a46 | 29-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
mbedtls_config_uta.h: enable check key usage
Defines MBEDTLS_X509_CHECK_KEY_USAGE to enable checking key usage of a certificate.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-o
mbedtls_config_uta.h: enable check key usage
Defines MBEDTLS_X509_CHECK_KEY_USAGE to enable checking key usage of a certificate.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4bca302a | 22-May-2018 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
pta: add system pTA
Add system pTA, which provides misc. auxiliary services, extending existing GlobalPlatform Core API. Add a call for seeding entropy to the default RNG pool.
Reviewed-by: Jens Wi
pta: add system pTA
Add system pTA, which provides misc. auxiliary services, extending existing GlobalPlatform Core API. Add a call for seeding entropy to the default RNG pool.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|
| c6672fdc | 28-Feb-2018 |
Edison Ai <edison.ai@arm.com> |
libmbedtls: refine mbedtls license header
e0186224bba7 ("libmbedtls: refine mbedtls license header") from branch import/mbedtls-2.6.1
New header format according to this: https://github.com/OP-TEE/
libmbedtls: refine mbedtls license header
e0186224bba7 ("libmbedtls: refine mbedtls license header") from branch import/mbedtls-2.6.1
New header format according to this: https://github.com/OP-TEE/optee_os/blob/master/documentation/ copyright_and_license_headers.rst
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Edison Ai <edison.ai@arm.com> [jw: removed the now redundant SPDX-License-Identifier] Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a97bc4a0 | 18-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
libmbedtls: configure and compile mbedtls
Configures mbedtls with a minimal user mode TA configuration and makes it compile.
Adds dummy include/mbedtls_config_kernel.h to give a good error message
libmbedtls: configure and compile mbedtls
Configures mbedtls with a minimal user mode TA configuration and makes it compile.
Adds dummy include/mbedtls_config_kernel.h to give a good error message in case mbedTLS is compiled in for kernel mode.
mbedTLS is enabled for TAs with CFG_TA_MBEDTLS = y Builtin self tests are enabled with CFG_TA_MBEDTLS_SELF_TEST = y
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 817466cb | 22-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Squashed commit importing mbedtls-2.6.1 source
Squash merging branch import/mbedtls-2.6.1
215609ae4d8c ("mbedtls: configure mbedtls to reach for config") 6916dcd9b9cd ("mbedtls: remove default incl
Squashed commit importing mbedtls-2.6.1 source
Squash merging branch import/mbedtls-2.6.1
215609ae4d8c ("mbedtls: configure mbedtls to reach for config") 6916dcd9b9cd ("mbedtls: remove default include/mbedtls/config.h") b60fc42a5cd5 ("Import mbedtls-2.6.1")
Acked-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 433c4257 | 07-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Add rand() for TA usage
Adds rand() by declaring it in stdlib.h where it's expected to be found. Implementation is provided in libutee since it depends on TEE_GenerateRandom().
Reviewed-by: Joakim
Add rand() for TA usage
Adds rand() by declaring it in stdlib.h where it's expected to be found. Implementation is provided in libutee since it depends on TEE_GenerateRandom().
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9668cb1e | 07-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
stdint.h: include limits.h
The define SIZE_MAX uses ULONG_MAX, which is provided in limits.h.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.o
stdint.h: include limits.h
The define SIZE_MAX uses ULONG_MAX, which is provided in limits.h.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5b01430c | 07-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: import strcpy() and strncpy()
Imports strcpy() and strncpy() from newlib with license added
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@
libutils: import strcpy() and strncpy()
Imports strcpy() and strncpy() from newlib with license added
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 03368b7b | 07-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: import strstr() from newlib
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.
libutils: import strstr() from newlib
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5aa6e234 | 07-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: time.h: typedef time_t
Typedefs time_t as a int64_t
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklande
libutils: time.h: typedef time_t
Typedefs time_t as a int64_t
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dc0f4ec2 | 16-May-2018 |
Etienne Carriere <etienne.carriere@st.com> |
Remove license notice from STMicroelectronics files
Since a while the source files license info are defined by SPDX identifiers. We can safely remove the verbose license text from the files that are
Remove license notice from STMicroelectronics files
Since a while the source files license info are defined by SPDX identifiers. We can safely remove the verbose license text from the files that are owned by either only STMicroelectronics or only both Linaro and STMicroelectronics.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a94eb7ef | 15-May-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
util: remove unused macros
After commit 9a8117de1263 ("util: update fallback ADD_OVERFLOW() macro") and commit ecdedc94e720 ("util: update fallback SUB_OVERFLOW() macro"), the following macros are n
util: remove unused macros
After commit 9a8117de1263 ("util: update fallback ADD_OVERFLOW() macro") and commit ecdedc94e720 ("util: update fallback SUB_OVERFLOW() macro"), the following macros are not used anymore. Remove them.
__INTOF_HALF_MAX_SIGNED(type) __INTOF_MAX_SIGNED(type) __INTOF_MIN_SIGNED(type) __INTOF_MIN(type) __INTOF_MAX(type)
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ecdedc94 | 14-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
util: update fallback SUB_OVERFLOW() macro
Updates the fallback SUB_OVERFLOW() macro to better support mixed types in the arguments.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-b
util: update fallback SUB_OVERFLOW() macro
Updates the fallback SUB_OVERFLOW() macro to better support mixed types in the arguments.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9a8117de | 14-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
util: update fallback ADD_OVERFLOW() macro
Updates the fallback ADD_OVERFLOW() macro to better support mixed types in the arguments.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-b
util: update fallback ADD_OVERFLOW() macro
Updates the fallback ADD_OVERFLOW() macro to better support mixed types in the arguments.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2770e242 | 14-May-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: MIN/MAX macros for assembly code
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> |
| 2b38f7fd | 04-May-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutils: bget_malloc.c: fix overflow tests
The overflow tests in raw_calloc(), raw_realloc() and raw_malloc() are wrong. They don't work as expected when hdr_size and ftr_size are both zero. The bu
libutils: bget_malloc.c: fix overflow tests
The overflow tests in raw_calloc(), raw_realloc() and raw_malloc() are wrong. They don't work as expected when hdr_size and ftr_size are both zero. The bug is exposed by commit 96c1d8c56cde ("ta: TEE_Malloc() and friend: skips layers") which causes xtest 8033 to fail because TEE_Malloc(0, TEE_MALLOC_FILL_ZERO) now returns NULL.
In addition, the allocation functions in bget.c (bget(), bgetz() and bgetr()) take a parameter of type bufsize for the allocation size. This happens to be a (signed) long. On the other hand, raw_malloc(), raw_calloc() and raw_realloc() take a size_t parameter which is unsigned long. Therefore, large size values are incorrectly interpreted as being negative by the bget code, which then asserts. When run in the context of a TA, this causes a TA panic instead of a TEE_ERROR_OUT_OF_MEMORY error. This bug is also exposed by commit 96c1d8c56cde ("ta: TEE_Malloc() and friend: skips layers") and makes xtest 8034 and 8042 fail. 8034 is TEE_Malloc(0xFFFFFFFE, TEE_MALLOC_FILL_ZERO) while 8042 is TEE_Realloc(ptr, 0xFFFFFFFE).
Rework the raw_calloc(), raw_realloc() and raw_malloc() functions to use the MUL_OVERFLOW() and ADD_OVERFLOW() macros instead, operating on the proper types.
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>
show more ...
|