| 76948876 | 15-Dec-2021 |
Mengchi Cheng <mengcc@amazon.com> |
ta: pkcs11: Clean up temporary_object_list on object creation failure
Calls LIST_REMOVE() only from cleanup_volatile_obj_ref() this is always called to finalize object release. Allocated objects are
ta: pkcs11: Clean up temporary_object_list on object creation failure
Calls LIST_REMOVE() only from cleanup_volatile_obj_ref() this is always called to finalize object release. Allocated objects are always inserted into a list after being created and therefore need to be removed for its owner list before the memory is released.
This changes fixes an issue when handle_get() failed in create_object() and does not remove the reference from temporary_object_list.
Signed-off-by: Mengchi Cheng <mengcc@amazon.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 48685b6c | 16-Dec-2021 |
Jerome Forissier <jerome@forissier.org> |
arm64: bti: fail link phase if some objects do not support BTI
Adds the proper linker options (-z force-bti --fatal-warnings) to fail the link if some object files lack the BTI feature bit when BTI
arm64: bti: fail link phase if some objects do not support BTI
Adds the proper linker options (-z force-bti --fatal-warnings) to fail the link if some object files lack the BTI feature bit when BTI is requested (CFG_CORE_BTI=Y, CFG_TA_BTI=y). The options are added for tee.elf, ldelf.elf, in-tree TAs, in-tree user space shared libraries (CFG_ULIBS_SHARED=y) as well as for external TAs and shared libraries built with the dev kit.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| 5a8d8ba3 | 01-Dec-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: Export CFG_TA_BTI
Export CFG_TA_BTI for availability when compiling xtest
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by:
ta: Export CFG_TA_BTI
Export CFG_TA_BTI for availability when compiling xtest
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7a6682fc | 13-Dec-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
Move section .note.gnu.property after .text in lds files
It is observed that clang compiler sometimes places the .note.gnu.property at offset 0. For TA's, the loader expects the user_ta_header at th
Move section .note.gnu.property after .text in lds files
It is observed that clang compiler sometimes places the .note.gnu.property at offset 0. For TA's, the loader expects the user_ta_header at that location while for ldelf, _ldelf_start() is expected at this point. To avoid such conflicts place this section after the text section.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dbc2184e | 08-Dec-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: pkcs11: Fix memory leak
When sanitizing indirect templates, obj2 was getting allocated twice leading to memory leak.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Etienne
ta: pkcs11: Fix memory leak
When sanitizing indirect templates, obj2 was getting allocated twice leading to memory leak.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Fixes: https://github.com/OP-TEE/optee_os/issues/5022
show more ...
|
| 5818fdfd | 07-Dec-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
ta: pkcs11: increase default heap size to 32kB
In some test cases, 16kB memory configured is not enough, specifically while generating RSA keys, so increasing the default heap size to 32kB.
Signed-
ta: pkcs11: increase default heap size to 32kB
In some test cases, 16kB memory configured is not enough, specifically while generating RSA keys, so increasing the default heap size to 32kB.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 28eb53ac | 25-Nov-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
ta: pkcs11: remove unnecessary code
Remove unnecessary assignment.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> |
| 728777ac | 29-Nov-2021 |
Jerome Forissier <jerome@forissier.org> |
build: use CFLAGS32/CFLAGS64 when building in-tree TAs
Commit 19fdfcf617e3 ("build: ldelf and TAs can rely on CFLAGS32/CFLAGS64") only partially implements what is mentioned in the commit descriptio
build: use CFLAGS32/CFLAGS64 when building in-tree TAs
Commit 19fdfcf617e3 ("build: ldelf and TAs can rely on CFLAGS32/CFLAGS64") only partially implements what is mentioned in the commit description. The ldelf part is OK, but in-tree TAs still don't use CFLAGS32 or CFLAGS64. The reason is that the submodule name $(sm) is not ta_arm32 or ta_arm64 like for TAs build with the "dev kit". Instead, $(sm) is the name of the directory (such as "avb" for core/ta/avb, "pkcs11" for core/ta/pkcs11, etc.). Therefore, it is not arch-bits-ta_arm32 or arch-bits-ta_arm64 that needs to be set but arch-bits-$(sm).
Fixes: 19fdfcf617e3 ("build: ldelf and TAs can rely on CFLAGS32/CFLAGS64") Signed-off-by: Jerome Forissier <jerome@forissier.org> Tested-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9c3a1069 | 24-Nov-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
avb: Fix warnings in ta/avb/entry.c
Fixes -Wdeclaration-after-statement warnings in ta/avb/entry.c: ta/avb/entry.c: In function ‘write_persist_value’: ta/avb/entry.c:267:2: error: ISO C90 forbids mi
avb: Fix warnings in ta/avb/entry.c
Fixes -Wdeclaration-after-statement warnings in ta/avb/entry.c: ta/avb/entry.c: In function ‘write_persist_value’: ta/avb/entry.c:267:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] char *name_buf = params[0].memref.buffer; ^~~~ ta/avb/entry.c: In function ‘read_persist_value’: ta/avb/entry.c:316:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] char *name_buf = params[0].memref.buffer; ^~~~
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a5ea52c2 | 08-Oct-2021 |
Elvira Khabirova <e.khabirova@omp.ru> |
ta: pkcs11: fix a double-free
entry_processing_key() frees out_buf on error from derive_key_by_symm_enc(). Before this change, that led to a double-free.
Fixes: 8c499324e457 ("ta: pkcs11: Add funct
ta: pkcs11: fix a double-free
entry_processing_key() frees out_buf on error from derive_key_by_symm_enc(). Before this change, that led to a double-free.
Fixes: 8c499324e457 ("ta: pkcs11: Add function to set key data") Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Elvira Khabirova <e.khabirova@omp.ru>
show more ...
|
| b7964037 | 08-Oct-2021 |
Elvira Khabirova <e.khabirova@omp.ru> |
ta: pkcs11: fix a memory leak
Before this change, entry_find_objects_init() leaked e.g. find_ctx.
Fixes: fa1ac7676f39 ("ta: pkcs11: Don't load objects that don't match the search during find") Revi
ta: pkcs11: fix a memory leak
Before this change, entry_find_objects_init() leaked e.g. find_ctx.
Fixes: fa1ac7676f39 ("ta: pkcs11: Don't load objects that don't match the search during find") Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Elvira Khabirova <e.khabirova@omp.ru>
show more ...
|
| 830faade | 21-Oct-2021 |
Jerome Forissier <jerome@forissier.org> |
ta_dev_kit.mk: remove extra -o when creating static library
The archiver command: $(AR$(sm)) is not supposed to take a -o argument to specify its output, contrary to the linker for instance.
When G
ta_dev_kit.mk: remove extra -o when creating static library
The archiver command: $(AR$(sm)) is not supposed to take a -o argument to specify its output, contrary to the linker for instance.
When GNU ar is used, -o is simply ignored. However when LLVM ar is used an error is printed. Therefore remove this unwanted -o.
Fixes: 9faf0da7b854 ("mk: add library common makefile support") Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| be501eb1 | 05-Oct-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
util: rename ALIGNMENT_IS_OK to IS_ALIGNED_WITH_TYPE
Implement the renamed macro using the IS_ALIGNED definition.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carrie
util: rename ALIGNMENT_IS_OK to IS_ALIGNED_WITH_TYPE
Implement the renamed macro using the IS_ALIGNED definition.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4137952d | 23-Jan-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Add certificate object support
Adds support for:
PKCS #11 Cryptographic Token Interface Base Specification Version 2.40 Plus Errata 01
4.6 Certificate objects 4.6.3 X.509 public key ce
ta: pkcs11: Add certificate object support
Adds support for:
PKCS #11 Cryptographic Token Interface Base Specification Version 2.40 Plus Errata 01
4.6 Certificate objects 4.6.3 X.509 public key certificate objects
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 0ef6b144 | 25-Sep-2021 |
Victor Chong <victor.chong@linaro.org> |
ta: pkcs11: Add support for AES CMAC mechanisms
Add support for CKM_AES_CMAC* mechanisms.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linar
ta: pkcs11: Add support for AES CMAC mechanisms
Add support for CKM_AES_CMAC* mechanisms.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| 0ee43c37 | 23-Sep-2021 |
Clement Faure <clement.faure@nxp.com> |
ta_dev_kit.mk: set CFLAGS32 and CFLAGS64 to $(CFLAGS) by default
Prior to commit 19fdfcf617e3 ("build: ldelf and TAs can rely on CFLAGS32/CFLAGS64") was $(arch-bits-$(sm)) not set for TAs (note: $(s
ta_dev_kit.mk: set CFLAGS32 and CFLAGS64 to $(CFLAGS) by default
Prior to commit 19fdfcf617e3 ("build: ldelf and TAs can rely on CFLAGS32/CFLAGS64") was $(arch-bits-$(sm)) not set for TAs (note: $(sm) is the submodule name, i.e., ta_arm32 or ta_arm64 for TAs). As a result, $$(CFLAGS$$(arch-bits-$$(comp-sm-$2))) expanded to the value of CFLAGS in mk/compile.mk. With the introduction of the above commit, $(arch-bits-$(sm)) is always set to 32 or 64 depending on the TA architecture, so mk/compile.mk now evaluates $(CFLAGS32) or $(CFLAGS64). In order to keep the previous behavior while still allowing specific overrides for 32 or 64-bit, set CFLAGS32 and CFLAGS64 to $(CFLAGS) by default. This is consistent with what was done for other submodules in commit b09cddcab1ee ("Introduce CFLAGS32 and CFLAGS64").
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 70b6683b | 03-Jun-2021 |
Victor Chong <victor.chong@linaro.org> |
ta: pkcs11: Add support for more HMAC mechanisms
Add support for *_GENERAL MD5 and SHA based HMAC mechanisms.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <et
ta: pkcs11: Add support for more HMAC mechanisms
Add support for *_GENERAL MD5 and SHA based HMAC mechanisms.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| 42765f82 | 12-Jul-2021 |
Victor Chong <victor.chong@linaro.org> |
ta: pkcs11: Fix sign size comparison
The current check does not take into account input signature sizes that are larger than the hash size, which are invalid and should return an error. The input si
ta: pkcs11: Fix sign size comparison
The current check does not take into account input signature sizes that are larger than the hash size, which are invalid and should return an error. The input signature size can be less than the hash size, but not for the mechanisms the function is currently used for. Change the check to match exactly the hash size.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| 6f6d5e75 | 02-Jun-2021 |
Victor Chong <victor.chong@linaro.org> |
ta: pkcs11: Fix typo
Fix typo in comment.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta
ta: pkcs11: Fix typo
Fix typo in comment.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| c46bd3e1 | 14-Sep-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: bget_malloc: fix test in pool min size
Requires at least 1 kB for the initial malloc memory pool. The rational is that the initial pool min size is not straightforward to compute as it dep
libutils: bget_malloc: fix test in pool min size
Requires at least 1 kB for the initial malloc memory pool. The rational is that the initial pool min size is not straightforward to compute as it depends on the internals of the BGET implementation. However, with a requirement of at least 1 kB in initial memory pool we'll have good margin while still being reasonable.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b59038ba | 06-Sep-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: remove deprecated CFG_TA_DYNLINK
Fully remove configuration switch CFG_TA_DYNLINK that is deprecated since 3.6.0, see commit d1911a85142d ("core: load TAs using ldelf").
Signed-off-by: Etienne
ta: remove deprecated CFG_TA_DYNLINK
Fully remove configuration switch CFG_TA_DYNLINK that is deprecated since 3.6.0, see commit d1911a85142d ("core: load TAs using ldelf").
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 19fdfcf6 | 31-Aug-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
build: ldelf and TAs can rely on CFLAGS32/CFLAGS64
Defines arch-bits-$(sm) for ldelf and intree TAs sub components so that they can build using CFLAGS32 (or CFLAGS64) directives possibly passed by t
build: ldelf and TAs can rely on CFLAGS32/CFLAGS64
Defines arch-bits-$(sm) for ldelf and intree TAs sub components so that they can build using CFLAGS32 (or CFLAGS64) directives possibly passed by the build environment.
Defines arch-bits-ta_arm32 (resp. 64) in TA devkit to leverage CFLAGS32 (reps. CFLAGS64) directive passed by the build process. This change is needed for external package willing to pass specific directive to TA build sequence as toolchain's sysroot path.
Adds an inline comment describing $(sm) value in the in tree TAs build instructions.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 95636b36 | 25-Aug-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: make heap size configurable
Add a configuration switch for the PKCS11 TA heap size defaulting to 16kB as legacy.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-b
ta: pkcs11: make heap size configurable
Add a configuration switch for the PKCS11 TA heap size defaulting to 16kB as legacy.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| edce8377 | 25-Aug-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: describe CFG_PKCS11_TA_TOKEN_COUNT
Add a default value and a description for PKCS11 TA config switch CFG_PKCS11_TA_TOKEN_COUNT in ta/pkcs11/sub.mk.
Signed-off-by: Etienne Carriere <etie
ta: pkcs11: describe CFG_PKCS11_TA_TOKEN_COUNT
Add a default value and a description for PKCS11 TA config switch CFG_PKCS11_TA_TOKEN_COUNT in ta/pkcs11/sub.mk.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| 06bc8d19 | 25-Aug-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: move default config to ta sub.mk
Move PKCS#11 TA default configuration settings from mk/config.mk to ta/pkcs11/sub.mk.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Revi
ta: pkcs11: move default config to ta sub.mk
Move PKCS#11 TA default configuration settings from mk/config.mk to ta/pkcs11/sub.mk.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|