| f1e88805 | 08-Jul-2021 |
Jerome Forissier <jerome@forissier.org> |
Revert "libutee: TEE_MACCompareFinal(): panic if input size is too large"
This reverts commit dbb3274a60f0b258fe115ed1678fc569335c0c5d. It turns out the panic reason cited in the commit ("If input d
Revert "libutee: TEE_MACCompareFinal(): panic if input size is too large"
This reverts commit dbb3274a60f0b258fe115ed1678fc569335c0c5d. It turns out the panic reason cited in the commit ("If input data exceeds maximum length for the algorithm") applies to the message only and has nothing to do with macLen. The same sentence appears elsewhere in the spec where there is no ambiguity.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dbb3274a | 07-Jul-2021 |
Jerome Forissier <jerome@forissier.org> |
libutee: TEE_MACCompareFinal(): panic if input size is too large
The GlobalPlatform TEE Internal Core API specification mentions the following panic reason for TEE_MACCompareFinal(): "if input data
libutee: TEE_MACCompareFinal(): panic if input size is too large
The GlobalPlatform TEE Internal Core API specification mentions the following panic reason for TEE_MACCompareFinal(): "if input data exceeds the maximum length for the algorithm". The current code returns TEE_ERROR_MAC_INVALID instead. Fix this by assigning error code TEE_ERROR_BAD_PARAMETERS which gets translated into a panic later.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b2ac1d0f | 21-May-2021 |
Sergiy Kibrik <Sergiy_Kibrik@epam.com> |
synquacer: rng-pta: move rng_pta_client.h to common path
Header is platform independent and can be used by generic RNG PTA.
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> Reviewed-by: Jerome
synquacer: rng-pta: move rng_pta_client.h to common path
Header is platform independent and can be used by generic RNG PTA.
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fb19e98e | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: enable FF-A with SPM Core at S-EL2
This enables support for FF-A with SPM Core at S-EL2 in a secure hypervisor while OP-TEE is running at S-EL1 as a SP. This configuration is also know as "S-E
core: enable FF-A with SPM Core at S-EL2
This enables support for FF-A with SPM Core at S-EL2 in a secure hypervisor while OP-TEE is running at S-EL1 as a SP. This configuration is also know as "S-EL2 SPMC" in the FFA specification.
Compile with CFG_CORE_SEL2_SPMC=y
Note that this is an experimental feature, ABIs etc may have incompatible changes.
This depends on using the FF-A v4 patchset in the Linux kernel.
Reviewed-by: Jelle Sels <jelle.sels@arm.com> Co-developed-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 568fc276 | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
arm64: add read_cntvct()
Adds read_cntvct() to read Counter-timer Virtual Count register.
Note that arm32 already have this function.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-of
arm64: add read_cntvct()
Adds read_cntvct() to read Counter-timer Virtual Count register.
Note that arm32 already have this function.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c6e827c0 | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
Rename to barrier_read_counter_timer()
Renames barrier_read_cntpct() to barrier_read_counter_timer() to use a neutral name for the counter.
With SPMC at S-EL2 OP-TEE will be virtualized and must us
Rename to barrier_read_counter_timer()
Renames barrier_read_cntpct() to barrier_read_counter_timer() to use a neutral name for the counter.
With SPMC at S-EL2 OP-TEE will be virtualized and must use CNTVCT instead of CNTPCT while the old physical OP-TEE must continue to use CNTPCT.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 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 ...
|