| 8c6a8aff | 25-Oct-2017 |
wellsleep <wellsleeplz@gmail.com> |
Fix comment in tee_ree_fs.c
Signed-off-by: Liu Zheng <wellsleeplz@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 8d22c45d | 20-Sep-2017 |
Peifu Jiang <peifu.jiang@amlogic.com> |
rpmb: mask off RPV/CRC fields in CID to derive rpmb key
PRV (Product revision) [55:48] and CRC field [7:1] in CID would be changed when doing eMMC FFU. It is reasonable to mask off PRV and CRC in CI
rpmb: mask off RPV/CRC fields in CID to derive rpmb key
PRV (Product revision) [55:48] and CRC field [7:1] in CID would be changed when doing eMMC FFU. It is reasonable to mask off PRV and CRC in CID when using CID to derive RPMB key.
Signed-off-by: Peifu Jiang <peifu.jiang@amlogic.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| b6568717 | 08-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: REE FS: bugfix error path
Fixes problem in put_dirh_primitive() when another concurrent has detected an error and thus closed ree_fs_dirh as a part of error recovery.
Acked-by: Jerome Forissi
core: REE FS: bugfix error path
Fixes problem in put_dirh_primitive() when another concurrent has detected an error and thus closed ree_fs_dirh as a part of error recovery.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jianhui Li <airbak.li@hisilicon.com> (hi3798cv200) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU v8) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b4b1a20c | 22-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: REE FS: use RPMB for hash storage
REE FS uses RPMB (if available) for storage of dirfile hash.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Volodymyr Babchuk <vlad.babch
core: REE FS: use RPMB for hash storage
REE FS uses RPMB (if available) for storage of dirfile hash.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 078f18f8 | 22-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: RPMB FS: provide tee_rpmb_fs_raw_open()
Provides tee_rpmb_fs_raw_open() use by OP-TEE OS.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Volodymyr Babchuk <vlad.babchuk@gm
core: RPMB FS: provide tee_rpmb_fs_raw_open()
Provides tee_rpmb_fs_raw_open() use by OP-TEE OS.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 24f24f84 | 22-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: REE FS: close dirfile on error
REE FS closes the dirfile if returning error from a function that may have changed the content of a secure storage object. This effectively undoes previous opera
core: REE FS: close dirfile on error
REE FS closes the dirfile if returning error from a function that may have changed the content of a secure storage object. This effectively undoes previous operation.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a4ed7baf | 22-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: add hash parameter to dirfile interface
Adds a hash parameter to the dirfile interface. The hash is used in the same way as in the htree interface, that is, used to verify integrity on ope
core: FS: add hash parameter to dirfile interface
Adds a hash parameter to the dirfile interface. The hash is used in the same way as in the htree interface, that is, used to verify integrity on open and used to get updated hash on writes.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 142d5af2 | 06-Jun-2017 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
core: use mobjs for all shared buffers
To ease usage of REE-originated shared memory, all code that uses shared buffer is moved to mobjs. That means that TA loader, fs_rpc, sockets, etc all use mobj
core: use mobjs for all shared buffers
To ease usage of REE-originated shared memory, all code that uses shared buffer is moved to mobjs. That means that TA loader, fs_rpc, sockets, etc all use mobjs to represent shared buffers instead of simple paddr_t.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey)
show more ...
|
| 58c83eb5 | 01-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: REE_FS: avoid deadlock in ree_fs_create()
ree_fs_close() can't be called in ree_fs_create() cleanup as ree_fs_close() tries to acquire the mutex already acquired in ree_fs_create(). Copy relev
core: REE_FS: avoid deadlock in ree_fs_create()
ree_fs_close() can't be called in ree_fs_create() cleanup as ree_fs_close() tries to acquire the mutex already acquired in ree_fs_create(). Copy relevant content from ree_fs_close() instead.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 57aabac5 | 02-Jun-2017 |
Bogdan Liulko <bogdan.liulko@globallogic.com> |
Remove buffering for AES CTR
CTR mode of AES algorithm turns block cipher into stream cipher. It means that input data can has any size independent from block size. It must be processed and result c
Remove buffering for AES CTR
CTR mode of AES algorithm turns block cipher into stream cipher. It means that input data can has any size independent from block size. It must be processed and result ciphertext must be generated after each TEE_CipherUpdate function call. That is why it is incorrect to apply for AES CTR the input buffering on TEE_CipherUpdate call when size is not multiple of block size.
Signed-off-by: Bogdan Liulko <bogdan.liulko@globallogic.com> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Bogdan Liulko <bogdan.liulko@globallogic.com> (R-Car) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8d0f8b46 | 24-May-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_svc_copy_param() use ADD_OVERFLOW()
Replaces the integer overflow check in tee_svc_copy_param() with ADD_OVERFLOW()
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-
core: tee_svc_copy_param() use ADD_OVERFLOW()
Replaces the integer overflow check in tee_svc_copy_param() with ADD_OVERFLOW()
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5976a0a5 | 25-May-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: avoid incremental linking with -gc
The AArch64 linkers seems to have occasional problems with incremental linking (-i) in combination with garbage collect of sections (-gc). The way we're orga
core: avoid incremental linking with -gc
The AArch64 linkers seems to have occasional problems with incremental linking (-i) in combination with garbage collect of sections (-gc). The way we're organizing the layout of the binary used for paging depends on -gc to build the different dependency trees for unpaged and initialization code.
The problem in the linker is tracked in https://bugs.linaro.org/show_bug.cgi?id=3006 and https://sourceware.org/bugzilla/show_bug.cgi?id=21524
The problem typically manifests itself by: aarch64-toolchain/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-ld: BFD (Linaro_Binutils-2017.02) 2.27.0.20161019 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/aarch64-linux-gnu/snapshots/binutils-gdb.git~linaro_binutils-2_27-branch/bfd/elflink.c:8380 core/arch/arm/kernel/link.mk:90: recipe for target 'out/arm-plat-vexpress/core/init.o' failed make: *** [out/arm-plat-vexpress/core/init.o] Error 1
With this patch we replace the incremental linking with a full link using a special link script. With a full link we can't have undefined symbols so some dummy symbols are provided by the link script when some object files are skipped when reducing the dependency tree. To completely get rid of those dummy symbols the script that gathers the sections is replaced by a python script that skips listed sections (if provided).
In terms of features in the resulting binary, nothing is changed in this commit.
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ace6039f | 18-May-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: REE_FS: refcount dirfile handle
Introduces a reference counter to keep a dirfile handle open as long as a file or directory is open. This avoids the frequent open and close of the dirfile for
core: REE_FS: refcount dirfile handle
Introduces a reference counter to keep a dirfile handle open as long as a file or directory is open. This avoids the frequent open and close of the dirfile for operations on an already open file.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fd108c3e | 17-May-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: don't store uuid in dirfile interface
Skips storing pointer to uuid in struct tee_fs_dirfile_dirh.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <
core: FS: don't store uuid in dirfile interface
Skips storing pointer to uuid in struct tee_fs_dirfile_dirh.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 455856d4 | 19-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Remove SQL-FS
With recent developments in REE-FS SQL-FS has become redundant. This patch removes SQL-FS.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome.forissi
Remove SQL-FS
With recent developments in REE-FS SQL-FS has become redundant. This patch removes SQL-FS.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-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 ...
|
| dc9c6dda | 25-Apr-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
crypto: don't check hash size when the main algorithm is ECDSA
syscall_asymm_verify() (and therefore TEE_AsymmetricVerifyDigest()) incorrectly assumes that the hash algorithm is SHA1 when the main a
crypto: don't check hash size when the main algorithm is ECDSA
syscall_asymm_verify() (and therefore TEE_AsymmetricVerifyDigest()) incorrectly assumes that the hash algorithm is SHA1 when the main algorithm is ECDSA, and will panic the TA if the hash size is not set accordingly. This behavior does not comply with the TEE Internal Core API v1.1, which states:
"Where a hash algorithm is specified in the algorithm, digestLen SHALL be equal to the digest length of this hash algorithm".
For TEE_ALG_ECDSA_P192, TEE_ALG_ECDSA_P224, TEE_ALG_ECDSA_P256, TEE_ALG_ECDSA_P384 and TEE_ALG_ECDSA_P521, no hash algorithm is specified, and so we must not restrict the hash size to any specific value.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reported-by: Henrik Andersson <Henrik.Andersson@se.bosch.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| ac0bab7f | 13-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: REE FS: use the new dirfile interface
Uses the new dirfile interface to keep track of persistent objects.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carrie
core: REE FS: use the new dirfile interface
Uses the new dirfile interface to keep track of persistent objects.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260) Acked-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 ...
|
| 0c4e1284 | 13-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: key manager takes supplied UUID
The FS key manager takes a supplied UUID instead of extracting it from current session in order to be more flexible.
Reviewed-by: Jerome Forissier <jerome.
core: FS: key manager takes supplied UUID
The FS key manager takes a supplied UUID instead of extracting it from current session in order to be more flexible.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 22efbd4a | 13-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: add helpers for tee_fs_dirfile_fileh
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jen
core: FS: add helpers for tee_fs_dirfile_fileh
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d7767217 | 13-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: introduce dirfile interface
Introduces the dirfile interface which keeps a list of secure storage objects. Each object is represented by the UUID of the owning TA, a hash of the object, an
core: FS: introduce dirfile interface
Introduces the dirfile interface which keeps a list of secure storage objects. Each object is represented by the UUID of the owning TA, a hash of the object, and a handle to the name used in normal world to store the encrypted data of the object.
The interface allows queued atomic updates to avoid difficult races during creation and renaming of objects.
By keeping the list of the secure object files in a single database the collected state of the objects can be represented by a single hash or even a counter. This gives some flexibility when implementing anti-rollback protection.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f28e5060 | 13-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: htree: export/import hash of object
The hash-tree can be verified based on a known hash of the root node of a secure storage object. When syncing the hash tree the hash of the root node is sto
core: htree: export/import hash of object
The hash-tree can be verified based on a known hash of the root node of a secure storage object. When syncing the hash tree the hash of the root node is stored in an external location for further protection.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d5fe340f | 21-Mar-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: remove redundant fields from struct tee_svc_storage_head
Removes the unused/redundant fields magic, head_size, ds_size from struct tee_svc_storage_head. meta_size is renamed to attr_size t
core: FS: remove redundant fields from struct tee_svc_storage_head
Removes the unused/redundant fields magic, head_size, ds_size from struct tee_svc_storage_head. meta_size is renamed to attr_size to better reflect the usage.
The size of the data stream is calculated from the total size of the file minus attr_size. This makes the header static after it's initialized.
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 ...
|
| 73ea1cde | 21-Mar-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: let FOP->create() initialize the new file
Moves the code from syscall_storage_obj_create() that does several calls via the FOP interface into FOP->create() instead. With this all updates c
core: FS: let FOP->create() initialize the new file
Moves the code from syscall_storage_obj_create() that does several calls via the FOP interface into FOP->create() instead. With this all updates can be performed while the mutex is held. This makes the create operation easier to optimize as each call via the FOP interface is atomic.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 040bc0f0 | 03-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add test case for hash-tree
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@
core: add test case for hash-tree
Acked-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 ...
|
| e2adafec | 03-Apr-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: htree: fix undo update
Updates of the hash-tree can be undone by closing the hash-tree before tee_fs_htree_sync_to_storage() is called.
Before this patch the hash-tree was left in a half
core: FS: htree: fix undo update
Updates of the hash-tree can be undone by closing the hash-tree before tee_fs_htree_sync_to_storage() is called.
Before this patch the hash-tree was left in a half updated state if tee_fs_htree_close() was called before tee_fs_htree_sync_to_storage().
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|