| 33e4def6 | 25-Jan-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: REE FS: make sure dirty flag is set when object is truncated
When an object is truncated but the number of blocks is unchanged, only the metadata's length field is modified. The hash tree laye
core: REE FS: make sure dirty flag is set when object is truncated
When an object is truncated but the number of blocks is unchanged, only the metadata's length field is modified. The hash tree layer has to be notified so that it knows it has to flush the data before closing the object, otherwise the truncation is lost. Add a function for that purpose: tee_fs_htree_meta_set_dirty(), and call it whenever meta->length is updated.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6fde6f02 | 25-Jan-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Revert "core: fine grained tee_ta_mutex locking"
Commit 99f969dd6c99 ("core: fine grained tee_ta_mutex locking") fixes a deadlock that can occur if a TA is loaded while not enough page tables are av
Revert "core: fine grained tee_ta_mutex locking"
Commit 99f969dd6c99 ("core: fine grained tee_ta_mutex locking") fixes a deadlock that can occur if a TA is loaded while not enough page tables are available in pgt_cache to map the context. But it also splits up a big critical section and there's obviously a few hidden dependencies towards tee_ta_mutex causing stability issues with the pager. Running 'while xtest 1013; do true; done' in AArch64 with at least three threads running in parallel will ultimately fail.
Therefore, revert the fine grained locking commit until the race conditions are sorted out.
Reported-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 99f969dd | 18-Jan-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: fine grained tee_ta_mutex locking
Changes TA loading and session initialization to use fine grained locking based on the tee_ta_mutex.
This avoids a potential dead lock with PGT cache where w
core: fine grained tee_ta_mutex locking
Changes TA loading and session initialization to use fine grained locking based on the tee_ta_mutex.
This avoids a potential dead lock with PGT cache where we're waiting for new page tables with tee_ta_mutex locked, which prevents tee_ta_close_session() to indirectly return any page tables.
This change also removes the last really big critical section. With this TAs can be loaded in parallel.
Reported-by: Zhizhou Zhang <zhizhouzhang@asrmicro.com> Tested-by: Zhizhou Zhang <zhizhouzhang@asrmicro.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 31faca5d | 16-Jan-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove support for Allwinner A80 platform (plat-sunxi)
It has been almost three years since we have heard about plat-sunxi (no new contributions, no patch ack'ed or tested, no feedback at release ti
Remove support for Allwinner A80 platform (plat-sunxi)
It has been almost three years since we have heard about plat-sunxi (no new contributions, no patch ack'ed or tested, no feedback at release time). Therefore, remove support for this platform.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> CC: Sun Yangbang <sunny@allwinnertech.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 343c1571 | 17-Jan-2018 |
Peng Fan <peng.fan@nxp.com> |
tzc380: export more api
Introduce tzc_security_inversion_en tzc_enable_region tzc_fail_dump and tzc_int_clear.
When we want to block secure access to region configured TZC_ATTR_SP_NS_RW, need to us
tzc380: export more api
Introduce tzc_security_inversion_en tzc_enable_region tzc_fail_dump and tzc_int_clear.
When we want to block secure access to region configured TZC_ATTR_SP_NS_RW, need to use tzc_security_inversion_en.
Sometimes we need to configure the regions first, then enable the region.
tzasc380 interrupt could be enabled to catch some illegal access with tzc_fail_dump and tzc_int_clear.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| fe1404da | 20-Dec-2017 |
Peng Fan <peng.fan@nxp.com> |
tzc380: do not write reserved bits
For region0, only SP is configurable, so should not configure region low/high.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander
tzc380: do not write reserved bits
For region0, only SP is configurable, so should not configure region low/high.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| d7ac7d0f | 21-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto.h manages authenc context memory
To ease integration with other crypto libraries change the authenc context interface in crypto.h to manage the memory used for the authenc context.
Rev
core: crypto.h manages authenc context memory
To ease integration with other crypto libraries change the authenc context interface in crypto.h to manage the memory used for the authenc context.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 72a9b1a0 | 21-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto.h manages cipher context memory
To ease integration with other crypto libraries change the cipher context interface in crypto.h to manage the memory used for the cipher context.
Review
core: crypto.h manages cipher context memory
To ease integration with other crypto libraries change the cipher context interface in crypto.h to manage the memory used for the cipher context.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 82ef73bc | 21-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto.h manages mac context memory
To ease integration with other crypto libraries change the mac context interface in crypto.h to manage the memory used for the mac context.
Reviewed-by: Je
core: crypto.h manages mac context memory
To ease integration with other crypto libraries change the mac context interface in crypto.h to manage the memory used for the mac context.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ecf2e014 | 21-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto.h manages hash context memory
To ease integration with other crypto libraries change the hash context interface in crypto.h to manage the memory used for the hash context.
Reviewed-by:
core: crypto.h manages hash context memory
To ease integration with other crypto libraries change the hash context interface in crypto.h to manage the memory used for the hash context.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b1d7375c | 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove 'All rights reserved' from Linaro files
The text 'All rights reserved' is useless [1]. The Free Software Foundation's REUSE Initiative best practices document [2] does not contain these words
Remove 'All rights reserved' from Linaro files
The text 'All rights reserved' is useless [1]. The Free Software Foundation's REUSE Initiative best practices document [2] does not contain these words. Therefore, we can safely remove the text from the files that are owned by Linaro.
Generated by: spdxify.py --linaro-only --strip-arr optee_os/
Link: [1] https://en.wikipedia.org/wiki/All_rights_reserved Link: [2] https://reuse.software/practices/ Link: [3] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 78b7c7c7 | 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove license notice from Linaro files
Now that we have added SPDX identifiers, we can safely remove the verbose license text from the files that are owned by Linaro.
Generated by [1]: spdxify.p
Remove license notice from Linaro files
Now that we have added SPDX identifiers, we can safely remove the verbose license text from the files that are owned by Linaro.
Generated by [1]: spdxify.py --linaro-only --strip-license-text optee_os/
Link: [1] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 1bb92983 | 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] wa
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] was used to double check the license matching code in the Python script. All the licenses detected by scancode are either detected by spdxify.py, or have no SPDX identifier, or are false matches.
Link: [1] https://spdx.org/licenses/ Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Link: [3] https://github.com/nexB/scancode-toolkit Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| fb7ef469 | 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Reformat copyright/license header in files with an SPDX ID
Some files were committed with an SPDX license identifier before the rules were defined [1]. Reformat them accordingly.
[1] documentation/
Reformat copyright/license header in files with an SPDX ID
Some files were committed with an SPDX license identifier before the rules were defined [1]. Reformat them accordingly.
[1] documentation/copyright_and_license_headers.rst
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 1df3ba05 | 13-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: rename mattr_uflags_to_str()
Renames mattr_uflags_to_str() to mattr_perm_to_str() and report all permission bits using a 7 bytes long string instead.
This allows observing the permissions of
core: rename mattr_uflags_to_str()
Renames mattr_uflags_to_str() to mattr_perm_to_str() and report all permission bits using a 7 bytes long string instead.
This allows observing the permissions of the minimal kernel mapping added to the user space context.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Andrew Davis <andrew.davis@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1a8307fe | 13-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: mm: add kernel mapping to user map
Adds a minimal kernel mapping needed when user mapping is active.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Andrew Davis <andrew
core: mm: add kernel mapping to user map
Adds a minimal kernel mapping needed when user mapping is active.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Andrew Davis <andrew.davis@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 55705e76 | 13-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: refactor ASID management
Refactors Address Space Identifier management. The field in struct user_ta_ctx is moved into struct tee_mmu_info and renamed to asid.
Allocation refactored internally
core: refactor ASID management
Refactors Address Space Identifier management. The field in struct user_ta_ctx is moved into struct tee_mmu_info and renamed to asid.
Allocation refactored internally with asid_alloc() and asid_free() functions, based on bitstring.h macros.
ASIDs starts at 2, and is always an even number.
ASIDs with the lowest bit set is reserved for as the second ASID when using ASIDs in pairs.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Andrew Davis <andrew.davis@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1f3274b0 | 21-Dec-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove the unused file tee_authenc.h
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 5baee69a | 28-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add tadb
Adds tadb which is a database in which TAs can be stored leveraging secure storage for anti-rollback, key storage and list of TAs.
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.
core: add tadb
Adds tadb which is a database in which TAs can be stored leveraging secure storage for anti-rollback, key storage and list of TAs.
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 ...
|
| 064663e8 | 28-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto: add struct shdr helper functions
Adds struct shdr helper functions to allocate and verify a struct shdr.
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Fo
core: crypto: add struct shdr helper functions
Adds struct shdr helper functions to allocate and verify a struct shdr.
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 82b5346d | 28-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add shdr type SHDR_BOOTSTRAP_TA
Adds a signed header type for bootstrap TA. This type is used when there isn't any security domains installed yet.
Reviewed-by: Volodymyr Babchuk <vlad.babchuk
core: add shdr type SHDR_BOOTSTRAP_TA
Adds a signed header type for bootstrap TA. This type is used when there isn't any security domains installed yet.
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e98e3c87 | 28-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: provide tee_svc_storage_file_ops()
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wikla
core: provide tee_svc_storage_file_ops()
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b97e9666 | 28-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add refcount routines
Adds refcount_inc() and refcount_dec()
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by:
core: add refcount routines
Adds refcount_inc() and refcount_dec()
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 043411e5 | 21-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto: AES-GCM: internal_aes_gcm_{enc,dec}()
Adds internal_aes_gcm_enc() and internal_aes_gcm_dec() for encrypting/decrypting a complete message with an external expanded key.
Acked-by: Jero
core: crypto: AES-GCM: internal_aes_gcm_{enc,dec}()
Adds internal_aes_gcm_enc() and internal_aes_gcm_dec() for encrypting/decrypting a complete message with an external expanded key.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 54af8d67 | 21-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto: AES-GCM: separate encryption key
Separates the AES (CTR) encryption key from the rest of the context to allow more efficient key handling.
Acked-by: Jerome Forissier <jerome.forissier
core: crypto: AES-GCM: separate encryption key
Separates the AES (CTR) encryption key from the rest of the context to allow more efficient key handling.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|