| d1d226a5 | 07-Nov-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
Select cryptographic algorithms at compile time
Allows to disable some cryptographic algorithms by setting make variables at build time (either from the environment, the command line or by editing c
Select cryptographic algorithms at compile time
Allows to disable some cryptographic algorithms by setting make variables at build time (either from the environment, the command line or by editing core/lib/libtomcrypt/sub.mk).
For example: $ make ... CFG_CRYPTO=n $ make ... CFG_CRYPTO_DES=n
This can reduce the size of the TEE binary as well as its memory footprint:
$ make -j9 PLATFORM=vexpress-qemu_virt DEBUG= all mem_usage $ grep RAM out/arm32-plat-vexpress/core/tee.mem_usage RAM Usage 7DF00000 - 7DF39280 size 00039280 229 KiB 58 pages $ du -h out/arm32-plat-vexpress/core/tee.bin 164K out/arm32-plat-vexpress/core/tee.bin
$ make -j9 PLATFORM=vexpress-qemu_virt DEBUG= CFG_CRYPTO=n all mem_usage $ grep RAM out/arm32-plat-vexpress/core/tee.mem_usage RAM Usage 7DF00000 - 7DF1D280 size 0001D280 117 KiB 30 pages $ du -h out/arm32-plat-vexpress/core/tee.bin 104K out/arm32-plat-vexpress/core/tee.bin
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU virt, FVP) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| ef03bc1f | 12-Nov-2014 |
Pascal Brand <pascal.brand@st.com> |
Use bn_free to free big numbers
At some places of the code, some big numbers, allocated through bn_alloc_max(), were freed using free(). They are now free using bn_free()
Signed-off-by: Pascal Bran
Use bn_free to free big numbers
At some places of the code, some big numbers, allocated through bn_alloc_max(), were freed using free(). They are now free using bn_free()
Signed-off-by: Pascal Brand <pascal.brand@st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| 51835057 | 10-Nov-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
Fix memory leak in tee_svc_cryp_obj_copy()
The following Trusted App would lead to a memory leak in the TEE core:
TEE_ObjectHandle o1, o2; TEE_AllocateTransientObject(TEE_TYPE_RSA_KEYPAIR, 256,
Fix memory leak in tee_svc_cryp_obj_copy()
The following Trusted App would lead to a memory leak in the TEE core:
TEE_ObjectHandle o1, o2; TEE_AllocateTransientObject(TEE_TYPE_RSA_KEYPAIR, 256, &o1); TEE_GenerateKey(o1, 256, NULL, 0); TEE_AllocateTransientObject(TEE_TYPE_RSA_KEYPAIR, 256, &o2); TEE_CopyObjectAttributes(o2, o1); TEE_FreeTransientObject(o1); TEE_FreeTransientObject(o2);
The leak was introduced by commit ffe040395b13 ("Add crypto provider internal API").
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|