| 92ea2867 | 26-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta-dev-kit: export signed_hdr.h
Exports core/include/signed_hdr.h to host_include to be able to use struct shdr when testing TAs corrupted at different places.
Signed-off-by: Jens Wiklander <jens.w
ta-dev-kit: export signed_hdr.h
Exports core/include/signed_hdr.h to host_include to be able to use struct shdr when testing TAs corrupted at different places.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 7db9dcd6 | 23-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: fix error code for corrupt TA
Always return TEE_ERROR_SECURITY if tee_ta_load_check_shdr() fails in any tests of the TA binary.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Teste
core: fix error code for corrupt TA
Always return TEE_ERROR_SECURITY if tee_ta_load_check_shdr() fails in any tests of the TA binary.
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>
show more ...
|
| 93074435 | 20-Oct-2015 |
Pascal Brand <pascal.brand@st.com> |
pager: statistics through a static TA
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st
pager: statistics through a static TA
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 176c959d | 20-Oct-2015 |
Pascal Brand <pascal.brand@st.com> |
Remove unused defines
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| 453a5030 | 20-Oct-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: rename system calls (s/tee_svc_/syscall_/)
Assign the syscall_ prefix to all system calls to make them stand out from other functions.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro
core: rename system calls (s/tee_svc_/syscall_/)
Assign the syscall_ prefix to all system calls to make them stand out from other functions.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| d268f3c0 | 28-Sep-2015 |
etienne carriere <etienne.carriere@st.com> |
core/arm: trap access flag faults and fix FSR_FS_MASK
Reviewed-by: Etienne CARRIERE <etienne.carriere@st.com> Tested-by: Etienne CARRIERE <etienne.carriere@st.com> Reviewed-by: Jens Wiklander <jens.
core/arm: trap access flag faults and fix FSR_FS_MASK
Reviewed-by: Etienne CARRIERE <etienne.carriere@st.com> Tested-by: Etienne CARRIERE <etienne.carriere@st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 12ddd2b1 | 19-Oct-2015 |
Pascal Brand <pascal.brand@st.com> |
Introduce free_rsa_public_key() and free_ecc_public_key()
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand
Introduce free_rsa_public_key() and free_ecc_public_key()
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) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 39d1f75c | 13-Oct-2015 |
Pascal Brand <pascal.brand@st.com> |
pager: remove pages used by scratch memory
Libtomcrypt is using, because of mpa, some scratch memory used in intermediate computation. These data are useless once the acipher computation is complete
pager: remove pages used by scratch memory
Libtomcrypt is using, because of mpa, some scratch memory used in intermediate computation. These data are useless once the acipher computation is completed. That means that these data pages can be unmapped.
On QEMU, compiled with CFG_WITH_PAGER=y, "time xtest 4006" returns: - Before the patch real 3m 46.24s user 0m 0.19s sys 3m 45.51s - After the patch real 1m 29.00s user 0m 0.17s sys 1m 28.51s
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU with CFG_WITH_PAGER=y) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 8c4a5a9a | 16-Oct-2015 |
Peng Fan <Peng.Fan@freescale.com> |
arm: imx: add i.MX 6UltraLite and EVK board support
The i.MX 6UltraLite[1] is a high performance, ultra-efficient processor family featuring an advanced implementation of a single ARM® Cortex®-A7 co
arm: imx: add i.MX 6UltraLite and EVK board support
The i.MX 6UltraLite[1] is a high performance, ultra-efficient processor family featuring an advanced implementation of a single ARM® Cortex®-A7 core.
This patch add i.MX 6Ulralite EVK board support: 1. Add a uart driver for i.MX platforms 2. Introduce plat-imx for i.MX platforms 3. Introduce i.MX6 UltraLite platform 4. This patch has been tested using the following step, 4.1. build step: PLATFORM_FLAVOR=mx6ulevk make ARCH=arm PLATFORM=imx ${CROSS_COMPILE}-objcopy -O binary out/arm-plat-imx/core/tee.elf optee.bin copy optee.bin to the first partition of SD card which is used for boot. 4.2. Boot setting in uboot: run loadfdt; run loadimage; fatload mmc 1:1 0x9c100000 optee.bin; run mmcargs; bootz ${loadaddr} - ${fdt_addr}; 5. pass xtest
Note: CAAM is not implemented now, this will be added later.
[1] http://www.freescale.com/webapp/sps/site/prod_summary.jsp? code=i.MX6UL&tid=redI.MX6UL-FAMILY&uc=true&lang_cd=en
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Reviewed-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 ...
|
| d0665cc3 | 14-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
arm/pager: move init temp storage of hashes
When a paged OP-TEE binary is copied into secure memory with unpaged code and data in the correct location, but with init code and hashes of paged pages s
arm/pager: move init temp storage of hashes
When a paged OP-TEE binary is copied into secure memory with unpaged code and data in the correct location, but with init code and hashes of paged pages starting at the start of the .bss section. If .bss is large enough init code and hashes will fit entirely in the .bss section and as long as .bss is unused the data there is safe.
This assumption will not be true any longer if .bss shrinks dramatically due to reduced size of mpa scratch memory.
With this patch the hashes will be copied to a temporary safe location right after the init code. This location is the same as the start of the .text_pageable section so the hashes must be copied to the final location before the pager is initialized.
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 ...
|
| c5eaed6d | 14-Oct-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
Fix potential memory leak
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Revi
Fix potential memory leak
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@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 ...
|
| 85278139 | 12-Oct-2015 |
Sumit Garg <b49020@freescale.com> |
Add fsl ls1021a platform support.
Added plat-ls, with initial support for fsl ls1021a platform. Added uart driver (ns16550).
Signed-off-by: Sumit Garg <b49020@freescale.com> Reviewed-by: Jens Wikla
Add fsl ls1021a platform support.
Added plat-ls, with initial support for fsl ls1021a platform. Added uart driver (ns16550).
Signed-off-by: Sumit Garg <b49020@freescale.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 ...
|
| 35ade1d7 | 12-Oct-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
Fix memory leak (start enum)
Enumeration loop added for object corruption. Add missing free because of tee_svc_storage_set_enum obj_id memory allocation (malloc) during enumeration loop. Force obj_i
Fix memory leak (start enum)
Enumeration loop added for object corruption. Add missing free because of tee_svc_storage_set_enum obj_id memory allocation (malloc) during enumeration loop. Force obj_id to NULL in the enumation loop to skip freeing at 'exit' label statement. closes #494
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Jens Wiklander <jens.wiklander@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) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
show more ...
|
| 13c163aa | 09-Oct-2015 |
Pascal Brand <pascal.brand@st.com> |
Remove useless core/mm directory
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| 5468da97 | 09-Oct-2015 |
Pascal Brand <pascal.brand@st.com> |
Fix potential memory leak in File Storage
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: James Kung <james.kung@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| 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 ...
|
| 855ae4e1 | 30-Sep-2015 |
Pascal Brand <pascal.brand@st.com> |
plat-stm: increase secure memory
On plat-stm, available RAM for TA was 6MB. This is too small to run xtest 1005 and 1006, which are opening multiple session of os_test TA, which is huge.
This patch
plat-stm: increase secure memory
On plat-stm, available RAM for TA was 6MB. This is too small to run xtest 1005 and 1006, which are opening multiple session of os_test TA, which is huge.
This patch increases the available memory to TAs, to 14MB.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 2b07dcb9 | 16-Sep-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: avoid deadlocks caused by single-instance TA
Protect against deadlocks caused by single-instance TAs calling another single-instance TAs directly or indirectly. When a TA is invoked but alread
core: avoid deadlocks caused by single-instance TA
Protect against deadlocks caused by single-instance TAs calling another single-instance TAs directly or indirectly. When a TA is invoked but already is busy with another operation the calling thread is suspended using condvar_wait() until the TA is available again. This is effectively a lock which can cause a deadlock if several such locks are used at the same time but in different order.
This patch avoids this problem by only allowing one thread at a time to set a single-instance TA context busy. If the thread with a single-instance TA busy in the call stack tries to set an already busy TA context busy it will return TEE_ERROR_BUSY instead as there is a recursive loop in how the different TAs has invoked each other.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU - full test suite) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey - full test suite)
show more ...
|
| c0b62a68 | 23-Sep-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
libtomcrypt: ECC code depends on ASN1 routines
Fixes: $ make -j8 -s CFG_CRYPTO_{DSA,RSA}=n [...]libtomcrypt.a(ecc_sign_hash.o): In function `ecc_sign_hash': [...]ecc_sign_hash.c:166: undefined re
libtomcrypt: ECC code depends on ASN1 routines
Fixes: $ make -j8 -s CFG_CRYPTO_{DSA,RSA}=n [...]libtomcrypt.a(ecc_sign_hash.o): In function `ecc_sign_hash': [...]ecc_sign_hash.c:166: undefined reference to `der_encode_sequence_multi'
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| a10e3a91 | 23-Sep-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
libtomcrypt: build prngs folder when CFG_WITH_SOFTWARE_PRNG is set
sub.mk is now consistent with the definition of struct tee_ltc_prng in tee_ltc_provider.c.
Signed-off-by: Jerome Forissier <jerome
libtomcrypt: build prngs folder when CFG_WITH_SOFTWARE_PRNG is set
sub.mk is now consistent with the definition of struct tee_ltc_prng in tee_ltc_provider.c.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 3cd33645 | 09-Sep-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add big thread lock
Adds a big thread lock to only return busy when a kernel thread can't be allocated. This is compatible with current locking scheme in the Linux kernel driver, but also open
core: add big thread lock
Adds a big thread lock to only return busy when a kernel thread can't be allocated. This is compatible with current locking scheme in the Linux kernel driver, but also opens up for an easier and more flexible locking scheme in the driver.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> 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) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU and FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
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 ...
|
| 765bf81f | 09-Sep-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add condvar synchronization primitive
Adds condvar synchronization primitive which is similar to pthread_condvar.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Foris
core: add condvar synchronization primitive
Adds condvar synchronization primitive which is similar to pthread_condvar.
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 ...
|
| 0c6e5bd5 | 09-Sep-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: reimplement mutex with wait_queue
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@
core: reimplement mutex with wait_queue
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 ...
|
| 91598429 | 09-Sep-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add wait_queue primitive for synchronization
Adds a new primitive for synchronization, wait_queue.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.fo
core: add wait_queue primitive for synchronization
Adds a new primitive for synchronization, wait_queue.
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 ...
|