| b8d220d2 | 09-Mar-2016 |
Pascal Brand <pascal.brand@st.com> |
Remove TEE_ARRAY_SIZE definition
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> |
| 43e30efd | 14-Jan-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: deprecate old address translation functions
Deprecates the old address translation functions and removes their wrapper macros. All calls to the deprecated functions are replaced with calls to
core: deprecate old address translation functions
Deprecates the old address translation functions and removes their wrapper macros. All calls to the deprecated functions are replaced with calls to the new translation functions instead.
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 ...
|
| e43888b8 | 27-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: new OPTEE_MSG interface
* Changes to a new OPTEE_MSG interface to work with the generic TEE driver. * Removes TEESMC64_* defines as the TEESMC32_* functions are enhanced to take 64bit values
core: new OPTEE_MSG interface
* Changes to a new OPTEE_MSG interface to work with the generic TEE driver. * Removes TEESMC64_* defines as the TEESMC32_* functions are enhanced to take 64bit values where required in pairs of 32bit registers instead. * Changes open session meta information to be passed in two value parameters instead of one memref.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM) 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 ...
|
| 41d71430 | 16-Feb-2016 |
Pascal Brand <pascal.brand@st.com> |
Properties: prepare to add vendor specific properties
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| ff857a3a | 15-Feb-2016 |
Pascal Brand <pascal.brand@st.com> |
Properties: fix in case of TEE_ERROR_SHORT_BUFFER
* TEE_ERROR_SHORT_BUFFER errors are better handled in case of of properties inside the Core. * String and Binary Block were contraints to have a l
Properties: fix in case of TEE_ERROR_SHORT_BUFFER
* TEE_ERROR_SHORT_BUFFER errors are better handled in case of of properties inside the Core. * String and Binary Block were contraints to have a length lower than 80 bytes due to the use of an internal structure. This is removed
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 64a5011e | 10-Feb-2016 |
Pascal Brand <pascal.brand@st.com> |
Properties in kernel side
In order to ease the inclusion of vendor-specific properties, properties are now mostly described in the kernel. This allows a lower synchronization between user-side and k
Properties in kernel side
In order to ease the inclusion of vendor-specific properties, properties are now mostly described in the kernel. This allows a lower synchronization between user-side and kernel-side.
The only properties now handled at user-side are TA properties (apart from "gpd.ta.appID") as well as the TEE property "gpd.tee.arith.maxBigIntSize"
Early discussion can be found at https://github.com/OP-TEE/optee_os/pull/460 and https://github.com/OP-TEE/optee_os/pull/482
Suggested-by: Paul Swan <paswan@microsoft.com> 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 ...
|
| 9e84c17e | 21-Jan-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
RPMB: add file encryption
Adds support for CFG_ENC_FS=y when CFG_RPMB_FS=y.
The files stored on an RPMB partition are encrypted with AES in Cipher Block Chaining (CBC) mode with Encrypted Salt/Sect
RPMB: add file encryption
Adds support for CFG_ENC_FS=y when CFG_RPMB_FS=y.
The files stored on an RPMB partition are encrypted with AES in Cipher Block Chaining (CBC) mode with Encrypted Salt/Sector Initialization Vector (ESSIV). Each file has it own 128-bit File Encryption Key (FEK), randomly chosen when the file is created. The FEK is added to the FAT entry for the file, it is always decrypted with the Secure Storage Key (SSK) before use. The file path is reduced accordingly, so that a FAT entry is still 256 bytes. Each 256-byte block in the file is encrypted as follows:
k = 128 bits of SHA256(FEK); IV = AES_Encrypt(k, block number); encrypted_block = AES_CBC(IV, FEK, block_data);
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 ...
|
| a0749ba9 | 28-Jan-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
RPMB: update debug traces
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> |
| 88e6e089 | 27-Jan-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
RPMB: make device ID configurable
Introduce CFG_RPMB_FS_DEV_ID (default value: 0), so that the eMMC device used by the RPMB filesystem is easily configurable. For instance, set CFG_RPMB_FS_DEV_ID=1
RPMB: make device ID configurable
Introduce CFG_RPMB_FS_DEV_ID (default value: 0), so that the eMMC device used by the RPMB filesystem is easily configurable. For instance, set CFG_RPMB_FS_DEV_ID=1 for /dev/mmcblk1rpmb.
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 ...
|
| 188f5aa5 | 29-Jan-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
RPMB: make sure tee_rpmb_fs_write() is atomic
File updates have to be atomic, even in case of a powerdown event for instance. Therefore we must not write data in-place unless the update spans less t
RPMB: make sure tee_rpmb_fs_write() is atomic
File updates have to be atomic, even in case of a powerdown event for instance. Therefore we must not write data in-place unless the update spans less than rel_wr_blkcnt blocks.
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 ...
|
| 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 ...
|