| d5b65f30 | 09-Nov-2016 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
OP-TEE Benchmark
OP-TEE Benchmark feature provides timestamp data for the roundtrip time from libteec to OP-TEE OS core.
Benchmark PTA handles registration/unregistration commands of timestamp buff
OP-TEE Benchmark
OP-TEE Benchmark feature provides timestamp data for the roundtrip time from libteec to OP-TEE OS core.
Benchmark PTA handles registration/unregistration commands of timestamp buffer, invoked by optee_benchmark NW application, and performs registration of timestamp buffer in the linux kernel optee driver via RPC call.
To enable this feature set CFG_TEE_BENCHMARK compile flag to "y".
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|
| 31a29642 | 11-May-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: dump call stack of user TAs on abort
Update the abort handling code in the TEE core to support unwinding the user mode stack in addition to the kernel stack. unwind_arm32.c is modified slightl
core: dump call stack of user TAs on abort
Update the abort handling code in the TEE core to support unwinding the user mode stack in addition to the kernel stack. unwind_arm32.c is modified slightly so that it can be built for AArch64. This allows a 64-bit TEE core to dump both 32- and 64-bit TAs.
Paged TAs (CFG_PAGED_USER_TA=y) cannot currently be unwound, because the code is not ready to handle the page faults that might occur as the unwinding tables are accessed.
CFG_CORE_UNWIND is renamed to CFG_UNWIND since it enables both the kernel and user TA stack dumps. It is still set automatically when CFG_TEE_CORE_DEBUG=y.
32-bit user TAs have to be compiled with `-funwind-tables`, otherwise the call stack can't be unwound and the abort reports will not show a call stack .The TA dev kit takes care of adding this flag automatically when CFG_UNWIND=y.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 455856d4 | 19-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Remove SQL-FS
With recent developments in REE-FS SQL-FS has become redundant. This patch removes SQL-FS.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome.forissi
Remove SQL-FS
With recent developments in REE-FS SQL-FS has become redundant. This patch removes SQL-FS.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 040bc0f0 | 03-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add test case for hash-tree
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@
core: add test case for hash-tree
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 34e59a23 | 30-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
tee_internal_api.h: do not define non-standard macros
The macros SLogTrace(), SLogError(), SLogWarning() and S_VAR_NOT_USED() are nowhere mentioned in the GlobalPlatform TEE Internal Core API spec.
tee_internal_api.h: do not define non-standard macros
The macros SLogTrace(), SLogError(), SLogWarning() and S_VAR_NOT_USED() are nowhere mentioned in the GlobalPlatform TEE Internal Core API spec. Delete them.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 620e4edf | 21-Mar-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: export pTA invoke_tests API to ease tests integration
Suggested-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome
core: export pTA invoke_tests API to ease tests integration
Suggested-by: Jens Wiklander <jens.wiklander@linaro.org> 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 ...
|
| c04e5c1d | 13-Mar-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: introduce TA_FLAG_SECURE_DATA_PATH
Rename TA_FLAG_UNSAFE_NW_PARAMS into TA_FLAG_SECURE_DATA_PATH.
This change does NOT able secure data path support in OP-TEE. It is rather a pre-requisite fo
core: introduce TA_FLAG_SECURE_DATA_PATH
Rename TA_FLAG_UNSAFE_NW_PARAMS into TA_FLAG_SECURE_DATA_PATH.
This change does NOT able secure data path support in OP-TEE. It is rather a pre-requisite for later changes in OP-TEE regarding SDP support.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| f967662d | 02-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: demote allocation traces from DEBUG to FLOW
When CFG_TEE_CORE_USER_MEM_DEBUG=1 (which is the default, enables additional checks in tee_user_mem.c and also enables traces) and CFG_TEE_TA_LOG
libutee: demote allocation traces from DEBUG to FLOW
When CFG_TEE_CORE_USER_MEM_DEBUG=1 (which is the default, enables additional checks in tee_user_mem.c and also enables traces) and CFG_TEE_TA_LOG_LEVEL=3 (DEBUG), libutee logs messages for each and every allocation and deallocation, as follows:
DEBUG: USER-TA: tee_user_mem_alloc:343: Allocate: link:[0x1211a0], buf:[0x1211b0:12] DEBUG: USER-TA: tee_user_mem_free:442: Free: link:[0x1211a0], buf:[0x1211b0:12] ...
That's annoying and pretty much useless so let's change them to use the lower TRACE_FLOW level (CFG_TEE_TA_LOG_LEVEL=4) instead.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| a32a96ed | 13-Dec-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: add TEE iSocket interface and implementation
Adds TEE iSocket interface and corresponding user space implementation for TCP and UDP. A pseudo TA is defined for interaction with OP-TEE Core.
libutee: add TEE iSocket interface and implementation
Adds TEE iSocket interface and corresponding user space implementation for TCP and UDP. A pseudo TA is defined for interaction with OP-TEE Core.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8f07fe6f | 30-Jan-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: API: add 'const' qualifiers
As per the GlobalPlatform Internal Core API Specification v1.1, section 3.4 Parameter Annotations: "[...] the [in], [inbuf], [instring], [instringopt], and [ctx]
libutee: API: add 'const' qualifiers
As per the GlobalPlatform Internal Core API Specification v1.1, section 3.4 Parameter Annotations: "[...] the [in], [inbuf], [instring], [instringopt], and [ctx] annotations can make use of the const C keyword [...] the C header file of a compliant Implementation SHOULD use the const keyword when these annotations appear."
Note that the TA entry points: TA_OpenSessionEntryPoint(), TA_CloseSessionEntryPoint() and TA_InvokeCommandEntryPoint() are unchanged to avoid breaking existing code (not worth it).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b36311ad | 30-Jan-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: preserve error code when calling TEE_Panic()
On many occasions, libutee calls TEE_Panic(0) to kill a TA. When an error status from a lower layer is available, it is much more helpful to pas
libutee: preserve error code when calling TEE_Panic()
On many occasions, libutee calls TEE_Panic(0) to kill a TA. When an error status from a lower layer is available, it is much more helpful to pass it instead of zero, because the code is shown in the debug traces.
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>
show more ...
|
| bf7a587f | 25-Jan-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: AES CTS fix
Ad-hoc fix for regressions introduced by [1]. Tested on HiKey using latest optee_test including GlobalPlatform tests (32/64-bit TEE core, 32/64-bit libutee, with/without ARMv8 C
libutee: AES CTS fix
Ad-hoc fix for regressions introduced by [1]. Tested on HiKey using latest optee_test including GlobalPlatform tests (32/64-bit TEE core, 32/64-bit libutee, with/without ARMv8 CE acceleration).
Fixes: b1ecda78bab4 ("libutee: fix off-by-one error in tee_buffer_update()") [1] Fixes: https://github.com/OP-TEE/optee_os/issues/1305 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 883c4be3 | 13-Oct-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add support for user TA profiling with gprof (-pg)
Adds the infrastructure to collect profiling information from Trusted Applications running in user mode and instrumented with -pg. Enable with: CFG
Add support for user TA profiling with gprof (-pg)
Adds the infrastructure to collect profiling information from Trusted Applications running in user mode and instrumented with -pg. Enable with: CFG_TA_GPROF_SUPPORT=y.
Profiling support in itself adds no significant performance overhead. Instrumented applications however may run 1.3x - 2x slower, and have a larger .bss section (+1.36 times .text size for 32-bit TAs, +1.77 times .text size for 64-bit ones).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (D02 64-bit) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU 32-bit) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f3bb2312 | 13-Oct-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add options to build user libraries with profiling enabled (-pg)
Set CFG_TA_GPROF=y to build libutee and the user-mode versions of libutils and libmpa with the -pg flag (gprof profiling). This featu
Add options to build user libraries with profiling enabled (-pg)
Set CFG_TA_GPROF=y to build libutee and the user-mode versions of libutils and libmpa with the -pg flag (gprof profiling). This feature depends on TA profiling support in OP-TEE core which will be introduced in a later commit.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b1ecda78 | 20-Jan-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: fix off-by-one error in tee_buffer_update()
Makes the ROUNDUP() call in the "feeding from src" case consistent with the "feeding from buffer" case a few lines earlier. Without this fix, AES
libutee: fix off-by-one error in tee_buffer_update()
Makes the ROUNDUP() call in the "feeding from src" case consistent with the "feeding from buffer" case a few lines earlier. Without this fix, AES CTR encryption or decryption could fail because update would feed blocks too soon, leaving less than two blocks in the internal buffer thus causing utee_cipher_final() (called from TEE_CipherDoFinal()) to fail and panic the TA.
Fixes: https://github.com/OP-TEE/optee_os/issues/1203 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 090268f5 | 05-Dec-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: bugfix srcData == NULL cases
Fixes faulty treatment of srcData == NULL in TEE_CipherUpdate(), TEE_AEUpdate(), TEE_AEEncryptFinal(), TEE_AEDecryptFinal().
Reviewed-by: Jerome Forissier <jer
libutee: bugfix srcData == NULL cases
Fixes faulty treatment of srcData == NULL in TEE_CipherUpdate(), TEE_AEUpdate(), TEE_AEEncryptFinal(), TEE_AEDecryptFinal().
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Guanchao Liang <liang.guanchao@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> [Rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 9ac870c9 | 06-Jan-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Make sure "make clean" removes everything "make" has created under $(O)
"make clean" would leave behind some files and many directories. Fix this by correctly tracking the files and directories crea
Make sure "make clean" removes everything "make" has created under $(O)
"make clean" would leave behind some files and many directories. Fix this by correctly tracking the files and directories created under $(O) during the build process: - Fix incorrect file names in $(cleanfiles) and add a few missing ones. - Introduce a makefile macro: $(cleandirs-for-rmdir), defined in a new file: mk/cleandirs.mk. It returns the list of directories that should be removed, given a list of files. The clean target removes the files, then all the directories in depth- first order. $(O) is also removed, if found to be empty.
Note that a more straightforward approach was discussed in [1]: use "rm -rf $(O)/some_dir" and get rid of the whole file and directory tracking via $(cleanfiles) and $(cleandirs). Although it was agreed it would be safe, doing so would necessarily break the backward compatibility for build scripts relying on "make O=<some path>", due to the additional level ($(O)/some_dir).
Finally, mk/cleandirs.mk is exported to the TA dev kit and the clean rule for the TAs is updated.
[1] https://github.com/OP-TEE/optee_os/pull/1270
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> Acked-by: Andy Green <andy@warmcat.com>
show more ...
|
| 827308b8 | 25-Nov-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: TEE_AEUpdate(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378615 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@l
libutee: TEE_AEUpdate(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378615 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a9f92a95 | 25-Nov-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: TEE_AEEncryptFinal(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378616 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wikla
libutee: TEE_AEEncryptFinal(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378616 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2fda30ff | 25-Nov-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: TEE_AEDecryptFinal(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378617 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wikla
libutee: TEE_AEDecryptFinal(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378617 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4bd53c54 | 24-Nov-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: TEE_AllocateOperation(): rewrite FALLTHROUGH comment
Fixes: Coverity CID:1378629 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@li
libutee: TEE_AllocateOperation(): rewrite FALLTHROUGH comment
Fixes: Coverity CID:1378629 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f21873cd | 24-Nov-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: TEE_CipherDoFinal(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378631 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklan
libutee: TEE_CipherDoFinal(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378631 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e32c5ddf | 24-Nov-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: TEE_CipherUpdate(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378632 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wikland
libutee: TEE_CipherUpdate(): do nothing when (!srcData && !srcLen)
Fixes: Coverity CID:1378632 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b9d8f134 | 24-Nov-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: TEE_GetObjectValueAttribute(): 'a' and 'b' may be NULL
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> |
| be96c837 | 24-Nov-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: TEE_GetObjectValueAttribute(): copy data on success only
buf[0] and buf[1] can be relied upon only when utee_cryp_obj_get_attr() is successful.
Fixes: Coverity CID:1378646 Signed-off-by: J
libutee: TEE_GetObjectValueAttribute(): copy data on success only
buf[0] and buf[1] can be relied upon only when utee_cryp_obj_get_attr() is successful.
Fixes: Coverity CID:1378646 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|