| 8dceff9b | 21-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove CFG_ENC_FS
Removes CFG_ENC_FS, encryption is always enabled in the file systems from now on.
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64 GP) Tested-by: Etien
core: remove CFG_ENC_FS
Removes CFG_ENC_FS, encryption is always enabled in the file systems from now on.
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64 GP) Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (qemu_v8/b2260, reefs/sqlfs, gp testsuite) Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 21bbcc67 | 13-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove object checks in syscall_storage_start_enum()
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| eb6485e3 | 13-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove unneeded calls to tee_obj_verify()
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 1955df60 | 07-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_fs_rpc: hide internal definitions
Moves internal definitions in tee_fs_rpc.h to tee_fs_rpc.c.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <je
core: tee_fs_rpc: hide internal definitions
Moves internal definitions in tee_fs_rpc.h to tee_fs_rpc.c.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c3b3c4de | 07-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add RPC FS cache for payload data
Adds an RPC FS cache for payload data. Allocated RPC FS payload data isn't free until the thread exits the current command. This allows reuse of the memory al
core: add RPC FS cache for payload data
Adds an RPC FS cache for payload data. Allocated RPC FS payload data isn't free until the thread exits the current command. This allows reuse of the memory allocation, avoiding many needless entries of tee-supplicant.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6d2f7cf2 | 06-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: optimize tee_svc_storage_read_head()
Optimizes tee_svc_storage_read_head() by leaving the file descriptor open in the struct tee_obj.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.or
core: optimize tee_svc_storage_read_head()
Optimizes tee_svc_storage_read_head() by leaving the file descriptor open in the struct tee_obj.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5b5a1a48 | 05-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_obj_alloc() initialize file descriptor
tee_obj_alloc() initializes file descriptor in struct tee_obj to -1 to mark it invalid.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
core: tee_obj_alloc() initialize file descriptor
tee_obj_alloc() initializes file descriptor in struct tee_obj to -1 to mark it invalid.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 894b41ab | 05-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_obj_close() close all persistent objects
tee_obj_close() closes all persistent objects regardless of the 'fd' field. The 'close' operation is only called if 'fd' is positive.
Reviewed-by:
core: tee_obj_close() close all persistent objects
tee_obj_close() closes all persistent objects regardless of the 'fd' field. The 'close' operation is only called if 'fd' is positive.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 287359f4 | 22-Sep-2016 |
lackan <liang.guanchao@linaro.org> |
crypto: fix incorrect algo passed to cipher.final()
Fix an error in function tee_svc_cipher_update_helper, and add assert in function cipher_final to prevent it being called by an algorithm that is
crypto: fix incorrect algo passed to cipher.final()
Fix an error in function tee_svc_cipher_update_helper, and add assert in function cipher_final to prevent it being called by an algorithm that is not a symmetric cipher.
Signed-off-by: lackan <liang.guanchao@linaro.org> [Reword commit subject] Signed-off-by: Jerome Forissier <jerome.forissier@.linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9102ce21 | 19-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
syscall storage_obj_seek: fix sign extension
Fixes problem with sign extension (or lack thereof) for the syscall storage_obj_seek. Updates the general rules of arguments for syscalls to use signed 3
syscall storage_obj_seek: fix sign extension
Fixes problem with sign extension (or lack thereof) for the syscall storage_obj_seek. Updates the general rules of arguments for syscalls to use signed 32-bit parameters when a signed parameter is needed.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Suggested-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU and FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a2b0026c | 16-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Fix 64-bit compile error in tee_sql_fs.c
$ make PLATFORM=hikey CFG_SQL_FS=y CFG_ARM64_core=y [snip] core/tee/tee_sql_fs.c: In function ‘sql_fs_read’: core/tee/tee_sql_fs.c:740:41: error: comparison
Fix 64-bit compile error in tee_sql_fs.c
$ make PLATFORM=hikey CFG_SQL_FS=y CFG_ARM64_core=y [snip] core/tee/tee_sql_fs.c: In function ‘sql_fs_read’: core/tee/tee_sql_fs.c:740:41: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if ((fdp->pos + len) < len || fdp->pos > fdp->meta.length) ^ cc1: all warnings being treated as errors
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b5219b4c | 15-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: bugfix reading beyond end of file
Bugfix for reading beyond end of a persistent object when the file position is larger the the size of the data stream. Applies to both REE FS and SQL FS.
Rev
core: bugfix reading beyond end of file
Bugfix for reading beyond end of a persistent object when the file position is larger the the size of the data stream. Applies to both REE FS and SQL FS.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| caa9cf53 | 13-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
storage: SQL FS concurrency
Allow concurrent access by multi-session/multi-instance TA.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@lin
storage: SQL FS concurrency
Allow concurrent access by multi-session/multi-instance TA.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 15ace8d3 | 13-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
storage: REE FS concurrency
Allow concurrent access by multi-session/multi-instance TA.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@lin
storage: REE FS concurrency
Allow concurrent access by multi-session/multi-instance TA.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b81882b2 | 13-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
storage: protect TA directory with a mutex
There is a race condition in the code that creates and deletes trusted storage. If multiple threads invoke a multi-session TA to create and delete differen
storage: protect TA directory with a mutex
There is a race condition in the code that creates and deletes trusted storage. If multiple threads invoke a multi-session TA to create and delete different files (such as xtest 6016), the following can occur:
Thread 1 (create file1) | Thread 2 (delete file2) | | unlink("/TA_dir/file2"); mkdir("/TA_dir"); | | rmdir("/TA_dir"); create("/TA_dir/file1"); | => ENOENT |
Add a mutex to prevent this race condition.
Note: the bug is currently not triggered by xtest 1016 because the test is run for RPMB FS only, and because directory operations are no-ops in the RPMB implementation. The fix will be needed when enabling single-TA concurrency with the REE and SQL backends.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b6f862e8 | 30-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
storage: sqlfs: save memory when sql_fs_ftruncate() extends a file
There is no need to actually allocate a buffer filled with zeroes in sql_fs_ftruncate(). Instead, update write_block_partial() so t
storage: sqlfs: save memory when sql_fs_ftruncate() extends a file
There is no need to actually allocate a buffer filled with zeroes in sql_fs_ftruncate(). Instead, update write_block_partial() so that a NULL data pointer means all null bytes. This eliminates a large (4K) temporary allocation.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a7e22cf5 | 24-Aug-2016 |
Lijianhui (Airbak) <airbak.li@hisilicon.com> |
rpmb: move rpmb_mutex to fs layer
In rpmb_fs_write(), if other session write RPMB between read_fat() and tee_rpmb_write(), it may write to the same address. So move rpmb_mutex to fs layer for concur
rpmb: move rpmb_mutex to fs layer
In rpmb_fs_write(), if other session write RPMB between read_fat() and tee_rpmb_write(), it may write to the same address. So move rpmb_mutex to fs layer for concurrency scenarios.
Signed-off-by: Lijianhui (Airbak) <airbak.li@hisilicon.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dbb790c6 | 19-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: init FS key manager late
Switches to service_init_late() to initialize FS key manager as it depends on the tee_cryp_init service init call.
Reviewed-by: Jerome Forissier <jerome.forissier@lin
core: init FS key manager late
Switches to service_init_late() to initialize FS key manager as it depends on the tee_cryp_init service init call.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b48323a9 | 18-May-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
secure storage: move common RPC code to its own file
The REE and SQL filesystems use similar RPC calls to tee-supplicant, only with a different command ID. Move the code to a common file.
Signed-of
secure storage: move common RPC code to its own file
The REE and SQL filesystems use similar RPC calls to tee-supplicant, only with a different command ID. Move the code to a common file.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 2ef14de1 | 11-May-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
secure storage: add SQL filesystem
This commit adds a new container type for trusted storage: SQL FS. Data are stored in the non-secure world, just like the REE FS (CFG_REE_FS). But, unlike REE FS w
secure storage: add SQL filesystem
This commit adds a new container type for trusted storage: SQL FS. Data are stored in the non-secure world, just like the REE FS (CFG_REE_FS). But, unlike REE FS which manipulates several files for each secure object, this implementation needs only one container in a SQLite database per secure object. We rely on the transaction-based nature of the database to provide atomicity.
A storage identifier is added to the TA API: TEE_STORAGE_PRIVATE_SQL. Trusted applications can use it to select this filesystem. The value TEE_STORAGE_PRIVATE defined by GlobalPlatform will also select the SQL FS if all other implementations are disabled.
This feature is enabled with CFG_SQL_FS=y. It depends on SQL support in tee-supplicant [1].
[1] https://github.com/OP-TEE/optee_client/pull/50
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| ad5d81d6 | 06-May-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
secure storage: make sure we don't try to delete a NULL file
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David Brown
secure storage: make sure we don't try to delete a NULL file
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 9dd29628 | 06-May-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
secure storage: add flag TEE_FS_S_IXUSR and use it
This flag should logically be set on directories so that they can be traversed.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Revi
secure storage: add flag TEE_FS_S_IXUSR and use it
This flag should logically be set on directories so that they can be traversed.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8ec4c4e9 | 03-May-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
secure storage: use absolute paths
Update the functions that create file and directory paths so that they always output a leading slash, meaning an absolute path in the underlying filesystem. In add
secure storage: use absolute paths
Update the functions that create file and directory paths so that they always output a leading slash, meaning an absolute path in the underlying filesystem. In addition to being cleaner, this can avoid path manipulations in the lower-level code. For instance, code using libsqlfs in tee-supplicant can use the path as-is. It does not make a difference with code that would prepend a more complex path anyway.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| a6573dd1 | 27-Apr-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
secure storage: move TEE_FS_MODE_* constants out of tee_fs_defs.h
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David B
secure storage: move TEE_FS_MODE_* constants out of tee_fs_defs.h
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8c9d9445 | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __asse
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __assert_log() uses EMSG_RAW() to no pollute trace with __assert_log() internals (duplicated file/line/func traces).
Change assert() to use a low/high verbosity mode upon CFG_TEE_CORE_DEBUG as panic() does.
Change assert() to also trace the C function where assertion failed.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|