| fe45728c | 22-Nov-2017 |
viennadd <viennadd@gmail.com> |
tee_fs_rpc_opendir(): avoid potential memory leak after early return
Fixes: https://github.com/OP-TEE/optee_os/issues/1960 Signed-off-by: Alex CHEN <viennadd@gmail.com> Reviewed-by: Jerome Forissier
tee_fs_rpc_opendir(): avoid potential memory leak after early return
Fixes: https://github.com/OP-TEE/optee_os/issues/1960 Signed-off-by: Alex CHEN <viennadd@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e1770e71 | 13-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: rename to <crypto/crypto.h>
Renames core/include/tee/tee_cryp_provider.h to core/include/crypto/crypto.h
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere
core: rename to <crypto/crypto.h>
Renames core/include/tee/tee_cryp_provider.h to core/include/crypto/crypto.h
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3bbd3ce9 | 10-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove struct crypto_ops
Removes struct crypto_ops and adds crypto_init()
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
core: remove struct crypto_ops
Removes struct crypto_ops and adds crypto_init()
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 291e5450 | 10-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace struct acipher_ops with function interface
Adds crypto_acipher_*() replacing struct acipher_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne
Replace struct acipher_ops with function interface
Adds crypto_acipher_*() replacing struct acipher_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 33790cc1 | 10-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace struct bignum_ops with function interface
Adds crypto_bignum_*() replacing struct bignum_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Car
Replace struct bignum_ops with function interface
Adds crypto_bignum_*() replacing struct bignum_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8875ce46 | 10-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace struct authenc_ops with function interface
Adds crypto_authenc_*() replacing struct authenc_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne
Replace struct authenc_ops with function interface
Adds crypto_authenc_*() replacing struct authenc_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e9eaba5c | 09-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace struct mac_ops with function interface
Adds mac_cipher_get_ctx_size(), mac_cipher_init(), mac_cipher_update() and mac_cipher_final() replacing struct mac_ops in crypto_ops.
Acked-by: Jerom
Replace struct mac_ops with function interface
Adds mac_cipher_get_ctx_size(), mac_cipher_init(), mac_cipher_update() and mac_cipher_final() replacing struct mac_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 82d91db1 | 09-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace struct cipher_ops with function interface
Adds crypto_cipher_get_ctx_size(), crypto_cipher_init(), crypto_cipher_update(), crypto_cipher_final() and crypto_cipher_get_block_size() replacing
Replace struct cipher_ops with function interface
Adds crypto_cipher_get_ctx_size(), crypto_cipher_init(), crypto_cipher_update(), crypto_cipher_final() and crypto_cipher_get_block_size() replacing struct cipher_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b887bd8f | 09-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace struct hash_ops with function interface
Adds crypto_hash_get_ctx_size(), crypto_hash_init(), crypto_hash_update() and crypto_hash_final() replacing struct hash_ops in crypto_ops.
Acked-by:
Replace struct hash_ops with function interface
Adds crypto_hash_get_ctx_size(), crypto_hash_init(), crypto_hash_update() and crypto_hash_final() replacing struct hash_ops in crypto_ops.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bd3efa26 | 31-Oct-2017 |
Zeng Tao <prime.zeng@hisilicon.com> |
core: crypto: add overflow check
In some use cases, the input value may cause add_overflow, this patch make the xxx_to_binary functions reporting the overflow errors instead of just let it to be voi
core: crypto: add overflow check
In some use cases, the input value may cause add_overflow, this patch make the xxx_to_binary functions reporting the overflow errors instead of just let it to be void, allowing the upper layer to deal with it.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com> [jf: fix typo in commit subject] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 05c5cd2e | 08-Nov-2017 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
tee: fix improper calloc usage
calloc() takes number of entries as first argument, and size of entry as a second. There was several places, where argument order was reversed.
Signed-off-by: Volodym
tee: fix improper calloc usage
calloc() takes number of entries as first argument, and size of entry as a second. There was several places, where argument order was reversed.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 36a063ef | 03-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace struct prng_ops with function interface
Adds crypto_rng_add_entropy() and crypto_rng_read() replacing struct prng_ops in crypto_ops.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.o
Replace struct prng_ops with function interface
Adds crypto_rng_add_entropy() and crypto_rng_read() replacing struct prng_ops in crypto_ops.
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 ...
|
| b399f70b | 07-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: RPMB_FS: remember owner uuid
Prior to this patch was the owning uuid looked up via the current session. The assumption that the uuid of the context of the current session is the same as the o
core: RPMB_FS: remember owner uuid
Prior to this patch was the owning uuid looked up via the current session. The assumption that the uuid of the context of the current session is the same as the owner of a RPMB file doesn't hold any longer after: commit 078f18f82eeb ("core: RPMB FS: provide tee_rpmb_fs_raw_open()") was introduced.
Instead the pointer to the uuid passed as the owner is stored in the file handle and used as needed when encrypting/decrypting the file.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Fixes: https://github.com/OP-TEE/optee_os/issues/1780 Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ae54853c | 07-Nov-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: fix access conflict status in rpmb fs that panics TA
According to the GPD TEE Internal Core API specs, when creating an existing persistent object without the overwrite flag, the OS should ret
core: fix access conflict status in rpmb fs that panics TA
According to the GPD TEE Internal Core API specs, when creating an existing persistent object without the overwrite flag, the OS should return a TEE_ERROR_ACCESS_CONFLICT status.
This change fixes the RPMB FS layer. An effect of this correction is that before this change, OS panicked TAs that requested such forbidden object creation, as a TEE_ERROR_BAD_PARAMETERS return value is considered by the API as an unexpected status.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU)
show more ...
|
| a7337d86 | 27-Oct-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: fix allocated object on object creation failure in svc storage
Changes syscall_storage_obj_create to give physical object ownership to the tee object layer only once storage is successfully in
core: fix allocated object on object creation failure in svc storage
Changes syscall_storage_obj_create to give physical object ownership to the tee object layer only once storage is successfully inited for that object. Otherwise, if tee_svc_storage_init_file fails, the storage does not own the physical object and close method will not release the object.
This change fixes https://github.com/OP-TEE/optee_test/issues/232.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 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 ...
|