| 3276098d | 03-Feb-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: introduce __maybe_unused
When a variable, parameter or function may or may not be referenced depending on some conditional compilation setting, mark it with __maybe_unused instead of __unused.
core: introduce __maybe_unused
When a variable, parameter or function may or may not be referenced depending on some conditional compilation setting, mark it with __maybe_unused instead of __unused. The goal is to improve code legibility.
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 ...
|
| 0795afd0 | 27-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: merge tee_ta_manager{,_unpg}.{c,h}
Merges tee_ta_manager_unpg.h into tee_ta_manager.h and tee_ta_manager_unpg.c into tee_ta_manager.c
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewe
core: merge tee_ta_manager{,_unpg}.{c,h}
Merges tee_ta_manager_unpg.h into tee_ta_manager.h and tee_ta_manager_unpg.c into tee_ta_manager.c
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 046ffe61 | 27-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: move cache syscall
Moves cache syscall code to arch/arm/tee
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander
core: move cache syscall
Moves cache syscall code to arch/arm/tee
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a8a78b85 | 27-Nov-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: RPMB (Replay Protected Memory Block) filesystem support
This is an update to the RPMB filesystem implementation so that the persistent object API may use RPMB rather than the REE filesystem. T
core: RPMB (Replay Protected Memory Block) filesystem support
This is an update to the RPMB filesystem implementation so that the persistent object API may use RPMB rather than the REE filesystem. This feature is enabled with CFG_RPMB_FS=y. Note that this implementation requires support from the non-secure side to actually access the RPMB partition, as there is no eMMC driver here. Also, the code is currently not compatible with CFG_ENC_FS (file encryption), which must be set to 'n'. Encryption will be added later.
Signed-off-by: Youssef Esmat <youssef.esmat@microsoft.com> Signed-off-by: Paul Swan <Paul.Swan@microsoft.com> [Rebased onto master, Linux driver/tee-supplicant support] 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 ...
|
| 36f28345 | 19-Jan-2016 |
Pascal Brand <pascal.brand@st.com> |
Fix final step in SSK generation
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Suggested-by: Collin Elhossari <collin.elhossari@
Fix final step in SSK generation
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Suggested-by: Collin Elhossari <collin.elhossari@gmail.com> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 4bf425c1 | 21-Dec-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace CFG_TEE_IMPL_VERSION with TEE_IMPL_VERSION
Replaces CFG_TEE_IMPL_VERSION with TEE_IMPL_VERSION to avoid updating <out-dir>/core/include/generated/conf.h each time description of the current
Replace CFG_TEE_IMPL_VERSION with TEE_IMPL_VERSION
Replaces CFG_TEE_IMPL_VERSION with TEE_IMPL_VERSION to avoid updating <out-dir>/core/include/generated/conf.h each time description of the current git commit is changed.
This avoids full recompiles that can't even be cached just because some files has changed in an updated commit.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8684fde8 | 26-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split struct tee_ta_ctx
Moves user ta specific parts into struct user_ta_ctx and static ta specific parts into struct static_ta_ctx.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested
core: split struct tee_ta_ctx
Moves user ta specific parts into struct user_ta_ctx and static ta specific parts into struct static_ta_ctx.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0dcea1a3 | 25-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split tee_ta_manager.c
Isolates static and user TA specifics into separate files. Almost no change in behaviour, except some changes for static TA to be more consistent.
Reviewed-by: Pascal B
core: split tee_ta_manager.c
Isolates static and user TA specifics into separate files. Almost no change in behaviour, except some changes for static TA to be more consistent.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8b4ed803 | 08-Jan-2016 |
Joakim Bech <joakim.bech@linaro.org> |
Remove unused functions
After finding a set of functions potentially not used anywhere (using gcc -Wl,--print-gc-sections) I did grep'd for those functions and the ones that couldn't be found to be
Remove unused functions
After finding a set of functions potentially not used anywhere (using gcc -Wl,--print-gc-sections) I did grep'd for those functions and the ones that couldn't be found to be used anywhere has been deleted (although utility functions, LibTomCrypt etc hasn't been touched).
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7215f52d | 07-Jan-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: trace_syscall(): print the syscall name in addition to its number
When CFG_TEE_CORE_LOG_LEVEL >= 4, a debug trace is printed whenever a system call is entered. Currently it just prints the sys
core: trace_syscall(): print the syscall name in addition to its number
When CFG_TEE_CORE_LOG_LEVEL >= 4, a debug trace is printed whenever a system call is entered. Currently it just prints the syscall number, which is not very convenient. This commit adds the name of the syscall function to the trace.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 3cb85474 | 10-Dec-2015 |
SY Chiu <sy.chiu@linaro.org> |
Secure Storage: fixed potential error while creating persistent object
Following is the issue description:
If we failed to create meta file while creating a new persistent object. We will leave a e
Secure Storage: fixed potential error while creating persistent object
Following is the issue description:
If we failed to create meta file while creating a new persistent object. We will leave a empty tee folder in ree filesystem.
Next time when we want to create tee file when the same object id, it will fail because the folder is already existed.
The patch solves this issue by checking if meta file is existed, instead of just checking if the folder is existed.
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (MT8173) Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 2dcb3d36 | 02-Dec-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: syscall_open_ta_session: do not copy session if TA is not found
Fixes the following xtest failure on HiKey:
root@HiKey:/ xtest 8031 [...] * XTEST_TEE_8031 a7-a3-6b ERR [761] TEES:load_ta:
core: syscall_open_ta_session: do not copy session if TA is not found
Fixes the following xtest failure on HiKey:
root@HiKey:/ xtest 8031 [...] * XTEST_TEE_8031 a7-a3-6b ERR [761] TEES:load_ta:317: TA not found ERR TEE-CORE:_assert_log:38: Assertion '((vaddr_t)kaddr - tee_svc_uref_base) < UINT32_MAX' failed at core/include/tee/tee_svc.h:83
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 ...
|
| 2ab7da0f | 27-Oct-2015 |
SY Chiu <sy.chiu@linaro.org> |
Secure Storage: Added a flag to turn Block Cache off
Introduce a new flag CFG_FS_BLOCK_CACHE (default off) to turn block cache on and off.
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY
Secure Storage: Added a flag to turn Block Cache off
Introduce a new flag CFG_FS_BLOCK_CACHE (default off) to turn block cache on and off.
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU,MT8173_EVB) Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 2b1cb5eb | 14-Sep-2015 |
SY Chiu <sy.chiu@linaro.org> |
Secure Storage: implement block cache
This patch increasing the access speed if you are frequently accessing some portion of data in a TEE file.
Tested on MediaTek MT8173 EVB, result as follows: (d
Secure Storage: implement block cache
This patch increasing the access speed if you are frequently accessing some portion of data in a TEE file.
Tested on MediaTek MT8173 EVB, result as follows: (default chunk size is 1KB):
(w/ block cache)
WRITE: -----------------+---------------+---------------- Data Size (B) | Time (s) | Speed (kB/s) -----------------+---------------+---------------- 256 | 0.005 | 50.000 512 | 0.007 | 71.429 1024 | 0.011 | 90.909 2048 | 0.027 | 74.074 4096 | 0.078 | 51.282 16384 | 0.348 | 45.977 524288 | 11.552 | 44.321 1048576 | 23.123 | 44.285 -----------------+---------------+----------------
READ: -----------------+---------------+---------------- Data Size (B) | Time (s) | Speed (kB/s) -----------------+---------------+---------------- 256 | 0.002 | 125.000 512 | 0.003 | 166.667 1024 | 0.004 | 250.000 2048 | 0.008 | 250.000 4096 | 0.015 | 266.667 16384 | 0.056 | 285.714 524288 | 1.745 | 293.410 1048576 | 3.489 | 293.494 -----------------+---------------+----------------
REWRITE: (Read-Modify-Write) -----------------+---------------+---------------- Data Size (B) | Time (s) | Speed (kB/s) -----------------+---------------+---------------- 256 | 0.010 | 25.000 512 | 0.012 | 41.667 1024 | 0.014 | 71.429 2048 | 0.035 | 57.143 4096 | 0.118 | 33.898 16384 | 0.517 | 30.948 524288 | 17.297 | 29.601 1048576 | 34.635 | 29.565 -----------------+---------------+----------------
(w/o block cache)
WRITE: -----------------+---------------+---------------- Data Size (B) | Time (s) | Speed (kB/s) -----------------+---------------+---------------- 256 | 0.006 | 41.667 512 | 0.008 | 62.500 1024 | 0.011 | 90.909 2048 | 0.034 | 58.824 4096 | 0.144 | 27.778 16384 | 0.577 | 27.730 524288 | 18.519 | 27.647 1048576 | 37.030 | 27.653 -----------------+---------------+----------------
READ: -----------------+---------------+---------------- Data Size (B) | Time (s) | Speed (kB/s) -----------------+---------------+---------------- 256 | 0.014 | 17.857 512 | 0.013 | 38.462 1024 | 0.014 | 71.429 2048 | 0.027 | 74.074 4096 | 0.068 | 58.824 16384 | 0.271 | 59.041 524288 | 8.683 | 58.966 1048576 | 17.372 | 58.945 -----------------+---------------+----------------
REWRITE: (Read-Modify-Write) -----------------+---------------+---------------- Data Size (B) | Time (s) | Speed (kB/s) -----------------+---------------+---------------- 256 | 0.047 | 5.319 512 | 0.047 | 10.638 1024 | 0.047 | 21.277 2048 | 0.094 | 21.277 4096 | 0.230 | 17.391 16384 | 0.921 | 17.372 524288 | 29.469 | 17.374 1048576 | 58.925 | 17.378 -----------------+---------------+----------------
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU,MT8173_EVB) Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 2e130e47 | 11-Nov-2015 |
SY Chiu <sy.chiu@linaro.org> |
Secure Storage: resolve memory leakage issue
This is caused by forgetting to store the backup_version of meta file in open_meta_file(). The backup_version field is random and this may generate two v
Secure Storage: resolve memory leakage issue
This is caused by forgetting to store the backup_version of meta file in open_meta_file(). The backup_version field is random and this may generate two versions of meta file in TEE file folder at commit time.
Unfortunately, we didn't handle this case well in tee_fs_common_rename(). If we have two meta files in TEE file folder, one buffer created by strdup() will leak. It's hard to handle this case elegantly in current implementation, so we just put a warning here.
We will propose a new design to address this issue later.
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU, MT8173 EVB) Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| e268fc08 | 01-Dec-2015 |
Pascal Brand <pascal.brand@st.com> |
Fix obj address in syscall_storage_obj_create()
This fixes "xtest 7584"
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Fix obj address in syscall_storage_obj_create()
This fixes "xtest 7584"
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) 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 ...
|
| e86f1266 | 05-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Make TEE Core TA interaction 64-bit compatible
* Updates TA entry * Update ta_head * Updates the syscall interface * Adds functions to make a short pointer (32-bit uref) from a kernel pointer and
Make TEE Core TA interaction 64-bit compatible
* Updates TA entry * Update ta_head * Updates the syscall interface * Adds functions to make a short pointer (32-bit uref) from a kernel pointer and vice versa
Note that this change is not backwards compatible, TAs needs to be recompiled.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 80ddeac7 | 06-Nov-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add ALIGNMENT_IS_OK to libutils/ext/include/util.h, delete unused code
TEE_ALIGNMENT_IS_OK() is renamed ALIGNMENT_IS_OK() and moved to lib/libutils/ext/include/util.h, which avoids duplication (was
Add ALIGNMENT_IS_OK to libutils/ext/include/util.h, delete unused code
TEE_ALIGNMENT_IS_OK() is renamed ALIGNMENT_IS_OK() and moved to lib/libutils/ext/include/util.h, which avoids duplication (was previously in core/include/kernel/tee_common_unpg.h and lib/libutee/include/utee_defines.h). Call sites are adjusted accordingly.
It is assumed that the compiler keyword __alignof__ is available, so CFG_TC_NO_ALIGNOF is of no use. We also remove unused definitions: TEE_ALIGNMENT_*B_IS_OK().
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 ...
|
| b666b6f2 | 28-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm: thread-safe sessions
Make session handling thread-safe with tee_ta_get_session(), tee_ta_put_session() and tee_ta_unlink_session().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.o
core: arm: thread-safe sessions
Make session handling thread-safe with tee_ta_get_session(), tee_ta_put_session() and tee_ta_unlink_session().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 2cdaaacb | 17-Nov-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: TEE_GetSystemTime() updates
- Set gpd.tee.systemTime.protectionLevel to 1000 when the time source is the physical count register (CNTPCT), that is, when CFG_SECURE_TIME_SOURCE_CNTPCT=y. The pr
core: TEE_GetSystemTime() updates
- Set gpd.tee.systemTime.protectionLevel to 1000 when the time source is the physical count register (CNTPCT), that is, when CFG_SECURE_TIME_SOURCE_CNTPCT=y. The protection level value is moved into the time_source struct for better modularity. - When the time source is REE (CFG_SECURE_TIME_SOURCE_REE=y), make sure that successive calls return increasing values as required by the GP TEE Core Internal API v1.1.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 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 ...
|
| 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 ...
|
| 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 ...
|
| 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 ...
|
| 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> |