| e5dc28cc | 28-Nov-2014 |
Pascal Brand <pascal.brand@st.com> |
Keep binary compatilities TEECore <--> TA
In case the core is compiled with CFG_TEE_TA_LOG_LEVEL=0 then TA cannot be compiled with CFG_TEE_TA_LOG_LEVEL!=0 because of the trace function.
This pa
Keep binary compatilities TEECore <--> TA
In case the core is compiled with CFG_TEE_TA_LOG_LEVEL=0 then TA cannot be compiled with CFG_TEE_TA_LOG_LEVEL!=0 because of the trace function.
This patch implements stub trace functions in case of unsufficient trace level. It also check - TRACE_LEVEL < 0 instead of TRACE_LEVEL == 0 - TRACE_LEVEL >= 0 instead of TRACE_LEVEL != 0 to take into account negative trae levels
Change-Id: I7b4d2d576c50e103d9cf6f5b22f9f99a1ab96d6a Signed-off-by: Pascal Brand <pascal.brand@st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 44202a48 | 26-Nov-2014 |
Pascal Brand <pascal.brand@st.com> |
Add MSG() macro for traces
MSG() and MSG_RAW() macros are added. They are the same as xMSG() and xMSG_RAW() existing macros, but are not subject to dynamic trace level
Note that when the core trace
Add MSG() macro for traces
MSG() and MSG_RAW() macros are added. They are the same as xMSG() and xMSG_RAW() existing macros, but are not subject to dynamic trace level
Note that when the core trace level is 0, these macros are void.
This patch also fixes an issue with "printf" level.
Change-Id: Ibff6058d7e35d728a46878b345b6e0833c18aec1 Reviewed-on: https://gerrit.st.com/18102 Reviewed-by: Emmanuel MICHEL <emmanuel.michel@st.com> Signed-off-by: Pascal Brand <pascal.brand@st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a7ec939b | 03-Nov-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Clean syscall handling
* Implements a svc handler suitable to supply as a handler for thread_svc_handler. * Removes hardcoded call to tee_svc_sycall in thread_svc_handler. * Removes duplicated c
Clean syscall handling
* Implements a svc handler suitable to supply as a handler for thread_svc_handler. * Removes hardcoded call to tee_svc_sycall in thread_svc_handler. * Removes duplicated code for unwinding of stack after tee_svc_enter_user_mode() replacing it with a single tee_svc_unwind_enter_user_mode()
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt and FVP) Reviewed-by: Etienne Carriere <etienne.carriere@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| 074ba9b2 | 09-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Move bget to libutils replacing dlmalloc
* Moves bget to libutils replacing dlmalloc as kernel memory allocator * Restores the code formatting of bget.{c,h} to the original state as parts of the c
Move bget to libutils replacing dlmalloc
* Moves bget to libutils replacing dlmalloc as kernel memory allocator * Restores the code formatting of bget.{c,h} to the original state as parts of the current code was unreadable * Adds malloc_add_pool() to make use of previously unused memory * Moves call to malloc_init() into platform specific code * Restores MDBG into working condition * Adds memalign function to bget.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (FVP) Reviewed-by: Etienne Carriere <etienne.carriere@st.com> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| b796ebf3 | 13-Nov-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
TEE_MACCompareFinal(): use buf_compare_ct(), don't clear stack on exit
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU v
TEE_MACCompareFinal(): use buf_compare_ct(), don't clear stack on exit
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU virt platform) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 4de4bebc | 20-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Merge tee_{core,uta}_trace.h into libutil
Merges tee_core_trace.h and tee_uta_trace.h into a common trace.h in libutil. Since the trace functions now resides libutil they have to rely on core and li
Merge tee_{core,uta}_trace.h into libutil
Merges tee_core_trace.h and tee_uta_trace.h into a common trace.h in libutil. Since the trace functions now resides libutil they have to rely on core and libutee to provide functions to print to the log device.
* Keeps compatible interface from tee_kta_trace.h * Adds TAMSG() and TAMSG_RAW() to log TA related events * Removes the TRACE_ALWAYS level
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform) Reviewed-by: Etienne Carriere <etienne.carriere@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| 2eb765fc | 03-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Move util.h from core into libutil
Moves util.h from core into libutil to make it available anywhere.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.bra
Move util.h from core into libutil
Moves util.h from core into libutil to make it available anywhere.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| 4e77495e | 03-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Rename and move TEE_COMPILE_TIME_ASSERT
Renames TEE_COMPILE_TIME_ASSERT to COMPILE_TIME_ASSERT, the macro is also moved to assert.h to be available anywhere.
Signed-off-by: Jens Wiklander <jens.wik
Rename and move TEE_COMPILE_TIME_ASSERT
Renames TEE_COMPILE_TIME_ASSERT to COMPILE_TIME_ASSERT, the macro is also moved to assert.h to be available anywhere.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| 73d6c3ba | 27-Oct-2014 |
Joakim Bech <joakim.bech@linaro.org> |
Digest operations now supports NULL arguments
Hash algorithms should support NULL arguments and zero length strings. Following changes will make is possible to call TEE_DigestUpdate and TEE_DigestDo
Digest operations now supports NULL arguments
Hash algorithms should support NULL arguments and zero length strings. Following changes will make is possible to call TEE_DigestUpdate and TEE_DigestDoFinal interchangeably.
Following combinations are now working. ---------------------------------------- | TEE_DigestUpdate | TEE_DigestDoFinal | ---------------------------------------- | NULL | NULL | | NULL | MESSAGE | | MESSAGE | NULL | | MESSAGE | MESSAGE | | N/A | NULL | | N/A | MESSAGE | ----------------------------------------
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (FVP) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| d49a58db | 20-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
libmpa: remove floating point calculations
Removes floating point calculations in libmap. The floating point calculations was unused but caused compile error when compiled with DEBUG=1.
Signed-off-
libmpa: remove floating point calculations
Removes floating point calculations in libmap. The floating point calculations was unused but caused compile error when compiled with DEBUG=1.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform)
show more ...
|
| d9d2e327 | 16-Oct-2014 |
Pascal Brand <pascal.brand@st.com> |
Fix TEE_BigIntMulMod
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| cebdec51 | 18-Sep-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Reenable warnings for all non-3rd party code
* Reenables warnings for all non-3rd party code * Renames dprintf macro to dprintf_level |
| 0e692b78 | 29-Aug-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Fix strict-aliasing for DEBUG=0 |
| fb4a92f1 | 08-Oct-2014 |
Pascal Brand <pascal.brand@st.com> |
Minor updates and cleanup |
| 52628354 | 17-Sep-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
Trace syscall entry when CFG_TEE_CORE_LOG_LEVEL == TRACE_FLOW (5) |
| b8976a60 | 15-Sep-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
plat-vexpress: fix non-debug build
Fixes a number of build errors when 'PLATFORM=vexpress' and 'DEBUG=': - '<var> may be used uninitialized' - 'dereferencing type-punned pointer will break strict-al
plat-vexpress: fix non-debug build
Fixes a number of build errors when 'PLATFORM=vexpress' and 'DEBUG=': - '<var> may be used uninitialized' - 'dereferencing type-punned pointer will break strict-aliasing rules' This one is addressed by adding -fno-strict-aliasing to the cflags for the problematic files, which is a temporary solution. - 'inlining failed'
Also, make sure tee_svc_syscall_table is aligned on a 32-bit boundary. Otherwise, an alignment fault might occur: ERR [0x0] TEE-CORE:tee_pager_print_error_abort:101: data-abort at 0x602f16b FSR 0x1 PC 0x6007bd4 TTBR0 0x603804A CONTEXIDR 0x1 CPUID 0x80000001 DBGPCSR 0x0 CPSR 0x80000013 (read from SPSR) ERR [0x0] TEE-CORE:tee_pager_handle_abort:164: [TEE_PAGER] alignement fault! (trap CPU)
Note: on Foundation_v8, I measured a ~3x speedup between debug and non-debug builds for asymmetric crypto tests.
show more ...
|
| 2c276d68 | 08-Sep-2014 |
Pascal Brand <pascal.brand@st.com> |
"Core Status" service on malloc
- Gets teecore heap info. - Enabled only on CFG_TEE_FW_DEBUG != 0. - Update dirty tests - Reset max allocated size after malloc dirty tests. |
| 8844ebfc | 02-Sep-2014 |
Pascal Brand <pascal.brand@st.com> |
Fix #6323: A failing RSA decode leads to panic
Change-Id: Ia4762f076922338f280d431f104b653e731bf64f Reviewed-on: https://gerrit.st.com/11598 Reviewed-by: Jean-Michel DELORME <jean-michel.delorme@st.
Fix #6323: A failing RSA decode leads to panic
Change-Id: Ia4762f076922338f280d431f104b653e731bf64f Reviewed-on: https://gerrit.st.com/11598 Reviewed-by: Jean-Michel DELORME <jean-michel.delorme@st.com> Tested-by: Jean-Michel DELORME <jean-michel.delorme@st.com> Tested-by: Jocelyn RICARD <jocelyn.ricard@st.com> Reviewed-by: Pascal BRAND <pascal.brand@st.com>
Update wrt comments from review
Fix returned error when the mode is not ok
show more ...
|
| f1c74b4b | 20-Aug-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Reentrancy fixes
Before this patch: The normal world was only allowed to enter secure world with one thread at a time.
After this patch: The normal world may try to enter secure world with as many
Reentrancy fixes
Before this patch: The normal world was only allowed to enter secure world with one thread at a time.
After this patch: The normal world may try to enter secure world with as many threads as it likes, secure world will return busy when no more threads can be allowed. Secure world still only allows one active thread at a time, but during RPC another thread may enter and do some work. This is needed for cancellation to work.
* Adds a mutex that waits in normal world if busy * Adds a new RPC service to wait in normal world * Imports bitstring.h from FreeBSD to aid mutex implementation * Adds a critical section in tee_ta_init_session * Unmaps TA before RPC exit and maps it again on return to handle rescheduling of threads during RPC * Doesn't clear a1-a3 when returning busy * Bugfixes vector_std_smc_entry
This patch depends on the "Allow parallel entries to secure world" patch in optee_linuxdriver.
show more ...
|
| 2ff3fdbb | 29-Aug-2014 |
Pascal Brand <pascal.brand@st.com> |
TEE_ROUNDxxx renamed in ROUNDxxx in libutee
This change is to have the same macro names in core part and libutee part |
| 55d3ebe9 | 22-Aug-2014 |
Pascal Brand <pascal.brand@st.com> |
Cleanup |
| 647f9c76 | 21-Aug-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
Get value of gpd.tee.arith.maxBigIntSize from libutee
The property gpd.tee.arith.maxBigIntSize was implemented in TEE core by tee_svc_sys_get_property() which was returning a constant taken from the
Get value of gpd.tee.arith.maxBigIntSize from libutee
The property gpd.tee.arith.maxBigIntSize was implemented in TEE core by tee_svc_sys_get_property() which was returning a constant taken from the crypto module (LTC_MAX_BITS_PER_VARIABLE / 2). The correct value is TEE_MAX_NUMBER_OF_SUPPORTED_BITS from libutee. This commit makes libutee return the appropriate value directly (without calling the TEE core) and deletes the property from the syscall. Additionally, this removes the unjustified dependency of tee_svc.c on <tee_ltc_wrapper.h>.
show more ...
|
| 27cbcc57 | 08-Aug-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Cleanup loading/unloading of a TA
* A TA is only loaded via tee-supplicant, directly supplying a pointer to the TA binary is not supported any longer. This requires and update to the client lib
Cleanup loading/unloading of a TA
* A TA is only loaded via tee-supplicant, directly supplying a pointer to the TA binary is not supported any longer. This requires and update to the client lib to avoid leaking shared memory. * The shared memory used to load the TA is freed as soon as the TA have been loaded into secure memory * Divides tee_ta_init_session() into sevaral functions * Divides tee_ta_close_session() into two functions * Divides tee_ta_load() into several functions with one separate function for signature verification * Removes some unused code for kernel TAs * Removes the option to lock/unlock a TA is only used by kernel TAs which we don't support any longer. * Removes the static global tee_rs. Switch to use Thread Local Storage pointer provided by the thread handler. * Adds TA_FLAG_USER_MODE by default to TA header since all TAs are user mode TAs now. * Reformats user_ta_header.c to make checkpatch less unhappy with it.
show more ...
|
| ec219598 | 13-Aug-2014 |
Pascal Brand <pascal.brand@st.com> |
Remove core dependencies from generic part
This concerns: - Communication Non-Secure <--> Secure - sys/types.h contains some types not defined on all compilers
Signed-off-by: Pascal Brand <pascal.b
Remove core dependencies from generic part
This concerns: - Communication Non-Secure <--> Secure - sys/types.h contains some types not defined on all compilers
Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 85411494 | 06-Aug-2014 |
Pascal Brand <pascal.brand@st.com> |
Cleanup Libtomcrypt
- Do not compile libtomcrypt tests anymore - Define LTC_NO_FILE to remove all file operations in libtomcrypt - Minor fix in argument description of malloc
Signed-off-by: Pascal
Cleanup Libtomcrypt
- Do not compile libtomcrypt tests anymore - Define LTC_NO_FILE to remove all file operations in libtomcrypt - Minor fix in argument description of malloc
Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|