| b0a1c250 | 05-Apr-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pta: scmi: new interface to REE SCMI agent
Adds a PTA interface to REE SCMI agents to get SCMI message communication channel for processing in OP-TEE SCMI server.
Currently implement supports
core: pta: scmi: new interface to REE SCMI agent
Adds a PTA interface to REE SCMI agents to get SCMI message communication channel for processing in OP-TEE SCMI server.
Currently implement supports for a SCMI server built with CFG_SCMI_MSG_SMT=y. The implementation is made so that an alternate SCMI server implementation can added.
Client gets SCMI channel capabilities with PTA_SCMI_CMD_CAPABILITIES. Client gets a handle for an SCMI channel with command PTA_SCMI_CMD_GET_CHANNEL_HANDLE. Client pushes SCMI messages with command PTA_SCMI_CMD_PROCESS_SMT_CHANNEL or PTA_SCMI_CMD_PROCESS_SMT_CHANNEL_MESSAGE.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c31a368d | 26-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
libutee: include: fix typo in pta_invoke_tests.h
In PTA "invoke test", the AES performance test command takes as argument key size value as bits instead of bytes. Fix typo in comment.
Signed-off-by
libutee: include: fix typo in pta_invoke_tests.h
In PTA "invoke test", the AES performance test command takes as argument key size value as bits instead of bytes. Fix typo in comment.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 13218059 | 01-Mar-2021 |
Matthieu BERTIN <matthieu.bertin@viaccess-orca.com> |
libutee: fix memory leak in bigint_binary_mod()
The modulus variable (mpi_n) in bigint_binary_mod() is never released, causing a memory leak in TEE_BigIntAddMod(), TEE_BigIntSubMod(), TEE_BigIntMulM
libutee: fix memory leak in bigint_binary_mod()
The modulus variable (mpi_n) in bigint_binary_mod() is never released, causing a memory leak in TEE_BigIntAddMod(), TEE_BigIntSubMod(), TEE_BigIntMulMod() and TEE_BigIntSquareMod(). Add the missing call.
Signed-off-by: Matthieu BERTIN <matthieu.bertin@viaccess-orca.com> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 2138a6f8 | 03-Mar-2021 |
Stefan Schmidt <snst@meek.de> |
libutee: add NULL pointer check in TEE_OpenPersistentObject()
Fix missing test on user object handle output reference in TEE_OpenPersistentObject().
Signed-off-by: Stefan Schmidt <snst@meek.de> Rev
libutee: add NULL pointer check in TEE_OpenPersistentObject()
Fix missing test on user object handle output reference in TEE_OpenPersistentObject().
Signed-off-by: Stefan Schmidt <snst@meek.de> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| dea9063e | 19-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: check srcLen in TEE_CipherDoFinal()
Adds another check of srcLen in TEE_CipherDoFinal() before calling tee_buffer_update() to make sure that we don't dereference destLen when it's NULL.
Th
libutee: check srcLen in TEE_CipherDoFinal()
Adds another check of srcLen in TEE_CipherDoFinal() before calling tee_buffer_update() to make sure that we don't dereference destLen when it's NULL.
This fixes coverity scan: CID 1501811 (#1 of 1): Dereference after null check (FORWARD_NULL)
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b6fa905f | 19-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: remove redundant NULL check in TEE_BigIntComputeExtendedGcd()
The gcd parameter passed to TEE_BigIntComputeExtendedGcd() must not be NULL so skip the unnecessary NULL check.
This fixes cov
libutee: remove redundant NULL check in TEE_BigIntComputeExtendedGcd()
The gcd parameter passed to TEE_BigIntComputeExtendedGcd() must not be NULL so skip the unnecessary NULL check.
This fixes coverity scan: CID 1501842 (#1 of 1): Dereference after null check (FORWARD_NULL)
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b68bcfeb | 19-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: add coverity note to TEE_Panic()
Coverity scans emits false positive "Dereference after null check" errors because it doesn't understand that TEE_Panic() doesn't return. Fix this by adding
libutee: add coverity note to TEE_Panic()
Coverity scans emits false positive "Dereference after null check" errors because it doesn't understand that TEE_Panic() doesn't return. Fix this by adding a __coverity_panic__() at the end of the function.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| eee637e7 | 10-Feb-2021 |
Alexander Zakharov <uglym8@gmail.com> |
Add 3DES CMAC implementation
CMAC is a Cipher-Based MAC that improves some of the security deficiencies found in CBC-MAC. It is described in NIST SP800-38B as a mode of operation for approved symmet
Add 3DES CMAC implementation
CMAC is a Cipher-Based MAC that improves some of the security deficiencies found in CBC-MAC. It is described in NIST SP800-38B as a mode of operation for approved symmetric block chipers, namely AES and TDEA.
CMAC has similar use cases and security guarantees as HMAC, with the difference that it uses a different primitive (symmetric cipher instead of hash function). CMAC may be appropriate for information systems in which an approved block cipher is more readily available than an approved hash function.
Commonly it is used for symmetric key diversification (ASC X9 TR 31-2018), data integrity assurance (ICV).
CMAC is public domain.
OP-TEE core already supports for AES CMAC, but not TDEA CMAC. This commit adds TDEA CMAC support.
Signed-off-by: Alexander Zakharov <uglym8@gmail.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: wrap commit description at 75 characters] Signed-off-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| a1d0f5d2 | 02-Feb-2021 |
Jerome Forissier <jerome@forissier.org> |
libutee: sockets: drop useless & before function names
There is no need to use & on a function name to obtain the function address. Drop the useless & characters.
Signed-off-by: Jerome Forissier <j
libutee: sockets: drop useless & before function names
There is no need to use & on a function name to obtain the function address. Drop the useless & characters.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e4ad5ccd | 08-Dec-2020 |
Aleksandr Anisimov <a.anisimov@omprussia.ru> |
libutee: add a new API to interact with plugins from TA
This patch adds a new API to libutee to interact with tee-supplicant plugins from TEE userspace.
Every user TA can use 'tee_invoke_supp_plugi
libutee: add a new API to interact with plugins from TA
This patch adds a new API to libutee to interact with tee-supplicant plugins from TEE userspace.
Every user TA can use 'tee_invoke_supp_plugin()' to send any commands to a plugin. The commands are predefined by the plugin developer.
See the https://github.com/linaro-swg/optee_examples repo for an example of using plugins.
Signed-off-by: Aleksandr Anisimov <a.anisimov@omprussia.ru> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 14d79887 | 08-Jan-2021 |
Igor Opaniuk <igor.opaniuk@gmail.com> |
core: pta: drop SDP PTA
Drop SDP PTA as it is not used anywhere and looks like isn't maintained. When is CFG_SDP_PTA=y the build fails with compile errors:
error: implicit declaration of function ‘
core: pta: drop SDP PTA
Drop SDP PTA as it is not used anywhere and looks like isn't maintained. When is CFG_SDP_PTA=y the build fails with compile errors:
error: implicit declaration of function ‘tee_ta_get_calling_session’; did you mean ‘ts_get_calling_session’? [-Werror=implicit-function-declaration] ... error: ‘struct tee_ta_session’ has no member named ‘ctx’
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 17c32c05 | 13-Jan-2021 |
Jerome Forissier <jerome@forissier.org> |
ta: fix processing of DT_FINI_ARRAY
The code that is supposed to invoke the finalization functions in the DT_FINI_ARRAY of a TA is broken. It mixes DT_INIT_ARRAY with DT_FINI_ARRAYSZ. As a result, t
ta: fix processing of DT_FINI_ARRAY
The code that is supposed to invoke the finalization functions in the DT_FINI_ARRAY of a TA is broken. It mixes DT_INIT_ARRAY with DT_FINI_ARRAYSZ. As a result, the finalization functions are never called and the TA may even crash on exit.
Fix the issue by replacing the erroneous DT_INIT_ARRAY with DT_FINI_ARRAY.
Fixes: dd655cb9906c ("ldelf, ta: add support for DT_INIT_ARRAY and DT_FINI_ARRAY") Reported-by: JY Ho <JY.Ho@mediatek.com> Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| baa5161d | 11-Dec-2020 |
Balint Dobszay <balint.dobszay@arm.com> |
core: ldelf: implement separate syscalls for ldelf
Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as
core: ldelf: implement separate syscalls for ldelf
Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as for utee_* syscalls. To distinguish between the different SVCs, the syscall handler pointer is updated before entering ldelf and restored after returning. The step of opening a system PTA session and invoking the commands there is eliminated, the necessary functionality is implemented in the ldelf syscall functions.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| 739fd3ab | 15-Dec-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: add isb() and barrier_read_cntpct()
Adds isb() and barrier_read_cntpct() to arm_user_sysreg.h, the latter to be used as a helper when reading CNTPCT.
Reviewed-by: Jerome Forissier <jerome@
libutee: add isb() and barrier_read_cntpct()
Adds isb() and barrier_read_cntpct() to arm_user_sysreg.h, the latter to be used as a helper when reading CNTPCT.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e6e7781f | 14-Dec-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: fix TEE_BigIntInit() memset()
The TEE_BigIntInit() supplied length is the number of words allocated for the bigint, including headers. Prior to this patch it seems it was assumed that lengt
libutee: fix TEE_BigIntInit() memset()
The TEE_BigIntInit() supplied length is the number of words allocated for the bigint, including headers. Prior to this patch it seems it was assumed that length was number of bits given the call to TEE_BigIntSizeInU32(). With this patch correct this by removing the TEE_BigIntSizeInU32() call.
Fixes: 062e3d01c039 ("ta: switch to to mbedtls for bignum") Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8e07702e | 15-Dec-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: TEE_CopyOperation() copy info.digestLength
When copying an operation include info.digestLength in the copied fields which is needed for the authenticated encryption algorithms AES-GCM and A
libutee: TEE_CopyOperation() copy info.digestLength
When copying an operation include info.digestLength in the copied fields which is needed for the authenticated encryption algorithms AES-GCM and AES-CCM.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Suggested-by: Tony He <tony.he@armchina.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8734de30 | 14-Dec-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: TEE_CopyOperation() check operation mode
Adds a check in TEE_CopyOperation() to panic if operation mode doesn't match in the source and destination operations.
Reviewed-by: Jerome Forissie
libutee: TEE_CopyOperation() check operation mode
Adds a check in TEE_CopyOperation() to panic if operation mode doesn't match in the source and destination operations.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cd0b577e | 07-Dec-2020 |
Jerome Forissier <jerome@forissier.org> |
libutee: user_ta_header.h: remove unused struct ta_func_head
struct ta_func_head is unused, remove it.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.
libutee: user_ta_header.h: remove unused struct ta_func_head
struct ta_func_head is unused, remove it.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fac28898 | 07-Dec-2020 |
Jerome Forissier <jerome@forissier.org> |
libutee: user_ta_header.h: remove unused property strings
user_ta_header.h defines a few macros with property names that are not used anywhere and are not part of any specification. Remove them.
Si
libutee: user_ta_header.h: remove unused property strings
user_ta_header.h defines a few macros with property names that are not used anywhere and are not part of any specification. Remove them.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 376db81e | 07-Dec-2020 |
Jerome Forissier <jerome@forissier.org> |
libutee: user_ta_header.h: remove unused enum user_ta_core_service_id
enum user_ta_core_service_id is unused, remove it.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne
libutee: user_ta_header.h: remove unused enum user_ta_core_service_id
enum user_ta_core_service_id is unused, remove it.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9bf34bd7 | 04-Dec-2020 |
Jerome Forissier <jerome@forissier.org> |
Remove unused file lib/libutee/errno.c
lib/libutee/errno.c is not built or used in any way so remove it.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklan
Remove unused file lib/libutee/errno.c
lib/libutee/errno.c is not built or used in any way so remove it.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cb1b1ecd | 25-Aug-2020 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: pta: SCP03 pseudo trusted application
Implement GlobalPlatform Secure Channel Protocol 3 control from REE. Secure boot requires that SCP03 is enabled as soon as secure storage is available (ie
core: pta: SCP03 pseudo trusted application
Implement GlobalPlatform Secure Channel Protocol 3 control from REE. Secure boot requires that SCP03 is enabled as soon as secure storage is available (ie RPMB).
Host side example: github.com/foundriesio/optee-scp03
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 919a5a68 | 06-Oct-2020 |
Jerome Forissier <jerome@forissier.org> |
Use fallthrough pseudo-keyword in switch/case statements
Use fallthrough; in switch/case statements. Imported libraries (libtomcrypt, libmbedtls) are not modified to minimize differences with upstre
Use fallthrough pseudo-keyword in switch/case statements
Use fallthrough; in switch/case statements. Imported libraries (libtomcrypt, libmbedtls) are not modified to minimize differences with upstream.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b9416909 | 24-Sep-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
Provide TEE_ATTR_FLAG_VALUE and TEE_ATTR_FLAG_PUBLIC
Provides TEE_ATTR_FLAG_VALUE and TEE_ATTR_FLAG_PUBLIC which are defined already in GP v1.0 [1] and also expected in GP v1.1 [2]. The old TEE_ATTR
Provide TEE_ATTR_FLAG_VALUE and TEE_ATTR_FLAG_PUBLIC
Provides TEE_ATTR_FLAG_VALUE and TEE_ATTR_FLAG_PUBLIC which are defined already in GP v1.0 [1] and also expected in GP v1.1 [2]. The old TEE_ATTR_BIT_VALUE and TEE_ATTR_BIT_PROTECTED are kept for backwards compatibility for now.
[1]: GlobalPlatform TEE Internal API Specification v1.0 [2]: GlobalPlatform TEE Internal Core API Specification v1.1
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ee2f75af | 09-Sep-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: fix TEE_GetOperationInfoMultiple()
The size parameter passed to TEE_GetOperationInfoMultiple() tells the size of the op_info buffer. The maximum number of keys which can be contained in the
libutee: fix TEE_GetOperationInfoMultiple()
The size parameter passed to TEE_GetOperationInfoMultiple() tells the size of the op_info buffer. The maximum number of keys which can be contained in the struct can be calculated from this size parameter.
Prior to this patch is was assumed that the caller by this specified the exact number of keys to report. This is not correct as the size parameter is only the upper limit. Fix this by instead figuring out how many keys (one or two) needs to be returned and after that check if the buffer is large enough.
Fixes: 05304565f188 ("GP11 : TEE_GetOperationInfoMultiple") Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|