| b66f219b | 26-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: fix cleanup in TEE_AllocateOperation()
Fixes error handling in TEE_AllocateOperation()
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@l
libutee: fix cleanup in TEE_AllocateOperation()
Fixes error handling in TEE_AllocateOperation()
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 94e8a4fc | 26-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: Optionally replace TEE_Panic() with macro
Help debugging by replacing TEE_Panic() with a macro that does an EMSG() and then calls panic function (__TEE_Panic()).
Signed-off-by: Jens Wiklan
libutee: Optionally replace TEE_Panic() with macro
Help debugging by replacing TEE_Panic() with a macro that does an EMSG() and then calls panic function (__TEE_Panic()).
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>
show more ...
|
| a2e9a830 | 16-Sep-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : trusted storage verify (block enc fs)
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@l
GP11 : trusted storage verify (block enc fs)
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 80475d29 | 09-Sep-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: use condvar when serializing TA execution
struct tee_ta_ctx::busy is used to serialize TA execution. Before this patch the operation would fail if busy is true. This patch waits for busy to be
core: use condvar when serializing TA execution
struct tee_ta_ctx::busy is used to serialize TA execution. Before this patch the operation would fail if busy is true. This patch waits for busy to become false if needed with help of wait_queue. Also uses the busy flag for open session to avoid races on multi-session single-instance TAs.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bfc6487b | 10-Sep-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
Flush traces synchronously
Avoids random mixing of secure world traces with ones from the normal world (assuming the normal world also flushes its debug traces synchronously).
The 'sync' parameter
Flush traces synchronously
Avoids random mixing of secure world traces with ones from the normal world (assuming the normal world also flushes its debug traces synchronously).
The 'sync' parameter to the trace_printf() and trace_ext_puts() function is removed because there seems to be no sensible use case mandating sync == false.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bc420748 | 05-May-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
TA as ELF + signature
Changes format of TA to use the ELF format instead. This patch also adds signature checking of the TA. The format of the TA is: <Signed header> <ELF header> <Program header> (p
TA as ELF + signature
Changes format of TA to use the ELF format instead. This patch also adds signature checking of the TA. The format of the TA is: <Signed header> <ELF header> <Program header> (part of ELF spec, pointing out segments to load) <Sections>
A struct ta_head is placed in the first section of the first segment to carry flags and other properties of the TA.
elf32.h, elf64.h and elf_common.h are imported from FreeBSD.
In addition to the R_ARM_RELATIVE relocation type, adds support for R_ARM_ABS32 relocations. Since a symbol table is needed to process this relocation type a separate program header is added in the TA ELF containing the sections .dynamic, .dynsym, .dynstr and .hash. These sections are only needed during relocation and could be released once the TA is relocated.
A default signing key has been generated with openssl genrsa -out key.pem and added as keys/default_ta.pem
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
show more ...
|
| f4c0a293 | 23-Jun-2015 |
SY Chiu <sy.chiu@linaro.org> |
Secure Storage: Implemented atomic operations
The following operations should be atomic:
- Write - Rename - Create/Delete - Truncate
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu
Secure Storage: Implemented atomic operations
The following operations should be atomic:
- Write - Rename - Create/Delete - Truncate
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU) Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 78239609 | 25-Aug-2015 |
Pascal Brand <pascal.brand@st.com> |
Fix leaking information from mem_neq
This fix comes from https://github.com/libtom/libtomcrypt/issues/74 mem_neq is a constant time comparison function, but it leaks information on the secre
Fix leaking information from mem_neq
This fix comes from https://github.com/libtom/libtomcrypt/issues/74 mem_neq is a constant time comparison function, but it leaks information on the secret data that is being compared in the value that is returned.
Signed-off-by: Pascal Brand <pascal.brand@st.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU)
show more ...
|
| 642a1607 | 24-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : operation state handling
Change-Id: I136443ef2f137b2e12902324d724fff7ce7c590e Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Jerome Forisssier <jerome.forissier@linaro.o
GP11 : operation state handling
Change-Id: I136443ef2f137b2e12902324d724fff7ce7c590e Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Jerome Forisssier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 325a2155 | 16-Jun-2015 |
Pascal Brand <pascal.brand@st.com> |
Remove useless src alignment check in TEE_UpdateXXX
Tested-by: Pascal BRAND <pascal.brand@st.com> Reviewed-by: Jean-Michel DELORME <jean-michel.delorme@st.com> Reviewed-by: Etienne CARRIERE <etienne
Remove useless src alignment check in TEE_UpdateXXX
Tested-by: Pascal BRAND <pascal.brand@st.com> Reviewed-by: Jean-Michel DELORME <jean-michel.delorme@st.com> Reviewed-by: Etienne CARRIERE <etienne.carriere@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> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| de57ee09 | 04-Aug-2015 |
Pascal Brand <pascal.brand@st.com> |
libmpa: remove DEBUG flag
Traces in libmpa comes from legacy code. They are not used in current code, nor can they be activated. Moreover, they look obsolete and look hard to be useful in current st
libmpa: remove DEBUG flag
Traces in libmpa comes from legacy code. They are not used in current code, nor can they be activated. Moreover, they look obsolete and look hard to be useful in current state.
This patch removes traces in libmpa. This includes - DEBUG and DEBUG_ME flags - macros MEMPOOL_MARKER and MEMPOOL_SANITY_CHECK - __mpa_dbg_xxx functions - macro ASSERT - files mpa_debug.h and mpa_assert.h
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 6d15db08 | 29-Jul-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: reset state after TEE_DigestDoFinal()
As per GlobalPlatform Internal API Specifications v1.0 and v1.1, section 6.3.2 TEE_DigestDoFinal: "Afterwards the Message Digest operation is reset [to
libutee: reset state after TEE_DigestDoFinal()
As per GlobalPlatform Internal API Specifications v1.0 and v1.1, section 6.3.2 TEE_DigestDoFinal: "Afterwards the Message Digest operation is reset [to initial state] and can be reused" (the words in square brackets are in v1.1 only).
Note that other TEE_xxxFinal() functions are not modified because the specifications state that the application shall panic if "the operation has not been started yet with TEE_[xxx]Init() or has already been finalized."
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 05304565 | 06-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : TEE_GetOperationInfoMultiple
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org
GP11 : TEE_GetOperationInfoMultiple
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 1962351e | 22-Jul-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libmpa: optimize size in mpa_get_str()
Save 4098 bytes of unpageable memory by removing option to group hex numbers in mpa_get_str().
Note API change in libmpa, dropping groupsize parameter for mpa
libmpa: optimize size in mpa_get_str()
Save 4098 bytes of unpageable memory by removing option to group hex numbers in mpa_get_str().
Note API change in libmpa, dropping groupsize parameter for mpa_get_str()
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 6d914f61 | 17-Jul-2015 |
Pascal Brand <pascal.brand@st.com> |
ECC: optimize the pool of temporary variables
ECC is using a lot (80) temporary variables. These variables are taken from a static pool, each being of the maximum key size supported in OP-TEE: 4096b
ECC: optimize the pool of temporary variables
ECC is using a lot (80) temporary variables. These variables are taken from a static pool, each being of the maximum key size supported in OP-TEE: 4096bits, times 2 to include wrapping multiplication in temporary computation.
With the introduction of being able to get temporary variables of a given size, the current patch optimize the use of the variables in case of ECC.
Thanks to this patch, the number of temporary variables is back to 50, and the emulated esram size (QEMU / FVP / HiKey) is back to 200KB.
Note that further optimization can be performed, for ECC and also for other algorithms (RSA,...).
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| df6be4e1 | 17-Jul-2015 |
Pascal Brand <pascal.brand@st.com> |
mpa: allocator for temporary variables
Tempory variables, in math, are taken in a pool. Each variable has its size maximized, that is 4096 * 2 in order to make overflowed operations.
However, in mo
mpa: allocator for temporary variables
Tempory variables, in math, are taken in a pool. Each variable has its size maximized, that is 4096 * 2 in order to make overflowed operations.
However, in most of the cases, like ECC, such big variable is not necessary.
This patch introduce an allocator to get temporary variables of given size, which is an enabler to reduce the number of required memory for temporary variables
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| c988227a | 15-Jul-2015 |
Pascal Brand <pascal.brand@st.com> |
ECC: ECDSA at GP level
Reviewed-by: Cedric Chaumont <cedric.chaumont@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Sign
ECC: ECDSA at GP level
Reviewed-by: Cedric Chaumont <cedric.chaumont@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 4e946126 | 03-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : TEE Arithmetical API fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@l
GP11 : TEE Arithmetical API fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| b64d6909 | 02-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : Time functions fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.
GP11 : Time functions fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 4a9bd0a7 | 09-Jul-2015 |
Paul Swan <Paul.Swan@microsoft.com> |
Remove the duplicate definition of ssize_t to instead use a single definition. Building OpenSSL as part of a TA resulted in both being included causing a build break.
Signed-off-by: Paul Swan <paswa
Remove the duplicate definition of ssize_t to instead use a single definition. Building OpenSSL as part of a TA resulted in both being included causing a build break.
Signed-off-by: Paul Swan <paswan@microsoft.com> Reviewed-by: Youssef Esmat <Youssef.Esmat@microsoft.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 84fa9467 | 02-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : Key derivation function fix
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (
GP11 : Key derivation function fix
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 12e66b6f | 02-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : Asymmetric functions fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.
GP11 : Asymmetric functions fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| b5816c88 | 01-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : AE functions fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.or
GP11 : AE functions fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 28e0efc6 | 01-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : MAC functions fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.o
GP11 : MAC functions fix/panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| dea1f2b6 | 30-Jun-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : Symmetric cipher functions panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont
GP11 : Symmetric cipher functions panic reason
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|