History log of /optee_os/lib/ (Results 126 – 150 of 883)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
f7a5c21e29-May-2023 Jerome Forissier <jerome.forissier@linaro.org>

arm64: memtag: strip tag from crash dumps

The MTE tag is not really useful when displaying a crash dump. In fact
it makes it more complicated for tools like script/symbolize.py to
retrieve the actua

arm64: memtag: strip tag from crash dumps

The MTE tag is not really useful when displaying a crash dump. In fact
it makes it more complicated for tools like script/symbolize.py to
retrieve the actual (untagged) virtual address, especially as we now
support non-Arm architectures and therefore blindly stripping the MTE
bits is not possible.

This commit strips the tag in call stacks displayed by
print_stack_arm64(). It also removes it from the virtual address shown
on abort (__print_abort_info()) since symbolize.py does try to resolve
the address as symbol + offset ; but in this case the tagged address is
printed as well, because it can be helpful to diagnose tag check faults.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...

af9ee0e024-May-2023 Alvin Chang <alvinga@andestech.com>

libutee: riscv: Fix relocation type of function call into __utee_panic()

In RISC-V, "j" instruction has R_RISCV_JAL relocation that can represent
an even signed 21-bit offset (+-1MiB). However, this

libutee: riscv: Fix relocation type of function call into __utee_panic()

In RISC-V, "j" instruction has R_RISCV_JAL relocation that can represent
an even signed 21-bit offset (+-1MiB). However, this range is not enough
to be position independent code, and the linker generates linking error.
Fix it by using "tail" instruction which has R_RISCV_CALL_PLT relocation
that the execution can jump to +-2GB location.

Note that we won't return from _utee_panic(), that's why we use "tail"
instead of "call" instruction so that we won't generate redundant return
instruction.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Acked-by: liushiwei <liushiwei@eswincomputing.com>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/dts/sama5d2.dtsi
/optee_os/core/arch/arm/include/ffa.h
/optee_os/core/arch/arm/include/kernel/secure_partition.h
/optee_os/core/arch/arm/include/kernel/spmc_sp_handler.h
/optee_os/core/arch/arm/include/kernel/thread_spmc.h
/optee_os/core/arch/arm/kernel/entry_a64.S
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/spmc_sp_handler.c
/optee_os/core/arch/arm/kernel/thread.c
/optee_os/core/arch/arm/kernel/thread_a32.S
/optee_os/core/arch/arm/kernel/thread_a64.S
/optee_os/core/arch/arm/kernel/thread_optee_smc_a32.S
/optee_os/core/arch/arm/kernel/thread_optee_smc_a64.S
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/kernel/virtualization.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/plat-aspeed/platform_ast2600.c
/optee_os/core/arch/arm/plat-bcm/main.c
/optee_os/core/arch/arm/plat-corstone1000/main.c
/optee_os/core/arch/arm/plat-imx/main.c
/optee_os/core/arch/arm/plat-k3/main.c
/optee_os/core/arch/arm/plat-ls/main.c
/optee_os/core/arch/arm/plat-marvell/main.c
/optee_os/core/arch/arm/plat-mediatek/main.c
/optee_os/core/arch/arm/plat-rcar/main.c
/optee_os/core/arch/arm/plat-rockchip/main.c
/optee_os/core/arch/arm/plat-rzn1/main.c
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-sam/main.c
/optee_os/core/arch/arm/plat-sprd/main.c
/optee_os/core/arch/arm/plat-stm/main.c
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-sunxi/main.c
/optee_os/core/arch/arm/plat-synquacer/main.c
/optee_os/core/arch/arm/plat-ti/main.c
/optee_os/core/arch/arm/plat-totalcompute/main.c
/optee_os/core/arch/arm/plat-uniphier/main.c
/optee_os/core/arch/arm/plat-versal/main.c
/optee_os/core/arch/arm/plat-vexpress/main.c
/optee_os/core/arch/arm/plat-zynq7k/main.c
/optee_os/core/arch/arm/plat-zynqmp/main.c
/optee_os/core/arch/riscv/kernel/thread_arch.c
/optee_os/core/arch/riscv/plat-virt/conf.mk
/optee_os/core/arch/riscv/plat-virt/main.c
/optee_os/core/arch/riscv/riscv.mk
/optee_os/core/drivers/atmel_saic.c
/optee_os/core/drivers/gic.c
/optee_os/core/drivers/hfic.c
/optee_os/core/drivers/pinctrl/atmel_pio.c
/optee_os/core/drivers/pinctrl/pinctrl.c
/optee_os/core/drivers/pinctrl/sub.mk
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/atmel_saic.h
/optee_os/core/include/drivers/gic.h
/optee_os/core/include/drivers/hfic.h
/optee_os/core/include/drivers/pinctrl.h
/optee_os/core/include/kernel/dt_driver.h
/optee_os/core/include/kernel/interrupt.h
/optee_os/core/include/kernel/virtualization.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/include/mm/mobj.h
/optee_os/core/kernel/dt_driver.c
/optee_os/core/kernel/interrupt.c
/optee_os/core/kernel/sub.mk
/optee_os/core/mm/core_mmu.c
/optee_os/core/pta/tests/dt_driver_test.c
/optee_os/core/pta/tests/sub.mk
libutee/arch/riscv/utee_syscalls_rv.S
/optee_os/mk/config.mk
/optee_os/ta/pkcs11/src/handle.c
/optee_os/ta/pkcs11/src/handle.h
/optee_os/ta/pkcs11/src/object.c
/optee_os/ta/pkcs11/src/pkcs11_token.c
/optee_os/ta/pkcs11/src/pkcs11_token.h
750c544c17-May-2023 Yuegui He <yuegui.he@amlogic.com>

libutils: Disable stack protector for __aeabi_uidivmod/__aeabi_idivmod

Some toolchain build optee_os with "-fstack-protector-strong",
But the generated codes add "check stack" operations after the
"

libutils: Disable stack protector for __aeabi_uidivmod/__aeabi_idivmod

Some toolchain build optee_os with "-fstack-protector-strong",
But the generated codes add "check stack" operations after the
"ret_idivmod_values", which overwrite the r1 value.

So __aeabi_uidivmod/__aeabi_idivmod will got error value,

Link: https://github.com/OP-TEE/optee_os/issues/6007
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Yuegui He <yuegui.he@amlogic.com>

show more ...

69e63e3315-May-2023 Alvin Chang <alvinga@andestech.com>

Add missing conditional compilation for RISC-V

RV64 also uses kern_sp. The elf.h is also used by RV32 and RV64.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Acked-by: Jerome Forissier <jerome

Add missing conditional compilation for RISC-V

RV64 also uses kern_sp. The elf.h is also used by RV32 and RV64.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

9fee17aa23-Jan-2023 Etienne Carriere <etienne.carriere@linaro.org>

libutils: add bit_ffs_from()

Adds bitstring function bit_ffs_from() that mimics bit_ffs() but looks
from a start bit position given as argument, and defines bit_ffs()
based on bit_ffs_from().

Revie

libutils: add bit_ffs_from()

Adds bitstring function bit_ffs_from() that mimics bit_ffs() but looks
from a start bit position given as argument, and defines bit_ffs()
based on bit_ffs_from().

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/CHANGELOG.md
/optee_os/core/arch/arm/dts/at91-sama5d27_wlsom1.dtsi
/optee_os/core/arch/arm/include/arm.h
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/include/mm/core_mmu_arch.h
/optee_os/core/arch/arm/kernel/asm-defines.c
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/entry_a32.S
/optee_os/core/arch/arm/kernel/entry_a64.S
/optee_os/core/arch/arm/kernel/kern.ld.S
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/thread_optee_smc_a64.S
/optee_os/core/arch/arm/kernel/virtualization.c
/optee_os/core/arch/arm/mm/tee_pager.c
/optee_os/core/arch/arm/plat-hisilicon/psci.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/config/imx6qdlsolo.h
/optee_os/core/arch/arm/plat-imx/config/imx6sl.h
/optee_os/core/arch/arm/plat-imx/config/imx6sll.h
/optee_os/core/arch/arm/plat-imx/config/imx6sx.h
/optee_os/core/arch/arm/plat-imx/platform_config.h
/optee_os/core/arch/arm/plat-imx/pm/psci.c
/optee_os/core/arch/arm/plat-imx/sm_platform_handler.c
/optee_os/core/arch/arm/plat-imx/sub.mk
/optee_os/core/arch/arm/plat-imx/tzc380.c
/optee_os/core/arch/arm/plat-ls/conf.mk
/optee_os/core/arch/arm/plat-ls/main.c
/optee_os/core/arch/arm/plat-rcar/romapi_call.S
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-sam/matrix.c
/optee_os/core/arch/arm/plat-sam/sam_sfr.c
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pmic.c
/optee_os/core/arch/arm/plat-sunxi/psci.c
/optee_os/core/arch/arm/plat-vexpress/main.c
/optee_os/core/arch/arm/plat-vexpress/platform_config.h
/optee_os/core/arch/arm/plat-zynqmp/main.c
/optee_os/core/arch/arm/plat-zynqmp/platform_config.h
/optee_os/core/arch/riscv/include/encoding.h
/optee_os/core/arch/riscv/include/mm/core_mmu_arch.h
/optee_os/core/arch/riscv/include/riscv.h
/optee_os/core/arch/riscv/kernel/boot.c
/optee_os/core/arch/riscv/kernel/kern.ld.S
/optee_os/core/arch/riscv/mm/tlb_helpers_rv.S
/optee_os/core/crypto.mk
/optee_os/core/drivers/atmel_piobu.c
/optee_os/core/drivers/atmel_rstc.c
/optee_os/core/drivers/atmel_rtc.c
/optee_os/core/drivers/atmel_shdwc.c
/optee_os/core/drivers/atmel_tcb.c
/optee_os/core/drivers/atmel_trng.c
/optee_os/core/drivers/atmel_wdt.c
/optee_os/core/drivers/cbmem_console.c
/optee_os/core/drivers/clk/clk-stm32mp13.c
/optee_os/core/drivers/clk/clk-stm32mp15.c
/optee_os/core/drivers/clk/clk_dt.c
/optee_os/core/drivers/clk/sam/sama5d2_clk.c
/optee_os/core/drivers/crypto/caam/acipher/caam_ecc.c
/optee_os/core/drivers/crypto/caam/acipher/sub.mk
/optee_os/core/drivers/crypto/caam/crypto.mk
/optee_os/core/drivers/crypto/caam/hal/common/hal_cfg_dt.c
/optee_os/core/drivers/crypto/caam/hal/common/hal_ctrl.c
/optee_os/core/drivers/crypto/caam/include/caam_acipher.h
/optee_os/core/drivers/crypto/caam/include/caam_hal_ctrl.h
/optee_os/core/drivers/crypto/caam/sub.mk
/optee_os/core/drivers/crypto/crypto_api/acipher/ecc.c
/optee_os/core/drivers/crypto/crypto_api/include/drvcrypt_acipher.h
/optee_os/core/drivers/crypto/se050/adaptors/apis/sss.c
/optee_os/core/drivers/crypto/se050/core/ecc.c
/optee_os/core/drivers/crypto/stm32/authenc.c
/optee_os/core/drivers/crypto/stm32/cipher.c
/optee_os/core/drivers/crypto/stm32/stm32_cryp.c
/optee_os/core/drivers/crypto/versal/ecc.c
/optee_os/core/drivers/i2c/atmel_i2c.c
/optee_os/core/drivers/i2c/i2c.c
/optee_os/core/drivers/i2c/sub.mk
/optee_os/core/drivers/imx/dcp/dcp.c
/optee_os/core/drivers/imx_caam.c
/optee_os/core/drivers/imx_csu.c
/optee_os/core/drivers/imx_i2c.c
/optee_os/core/drivers/imx_lpuart.c
/optee_os/core/drivers/imx_scu.c
/optee_os/core/drivers/imx_uart.c
/optee_os/core/drivers/imx_wdog.c
/optee_os/core/drivers/ls_dspi.c
/optee_os/core/drivers/pl011.c
/optee_os/core/drivers/pm/sam/at91_pm.c
/optee_os/core/drivers/rstctrl/rstctrl.c
/optee_os/core/drivers/rstctrl/stm32_rstctrl.c
/optee_os/core/drivers/serial8250_uart.c
/optee_os/core/drivers/stm32_bsec.c
/optee_os/core/drivers/stm32_etzpc.c
/optee_os/core/drivers/stm32_gpio.c
/optee_os/core/drivers/stm32_i2c.c
/optee_os/core/drivers/stm32_iwdg.c
/optee_os/core/drivers/stm32_rng.c
/optee_os/core/drivers/stm32_tamp.c
/optee_os/core/drivers/stm32_uart.c
/optee_os/core/drivers/sub.mk
/optee_os/core/drivers/tzc380.c
/optee_os/core/drivers/xiphera_trng.c
/optee_os/core/drivers/zynqmp_csu_aes.c
/optee_os/core/include/drivers/cbmem_console.h
/optee_os/core/include/drivers/clk_dt.h
/optee_os/core/include/drivers/i2c.h
/optee_os/core/include/drivers/rstctrl.h
/optee_os/core/include/kernel/dt.h
/optee_os/core/include/kernel/dt_driver.h
/optee_os/core/include/kernel/linker.h
/optee_os/core/include/kernel/tee_ta_manager.h
/optee_os/core/include/kernel/virtualization.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/kernel/console.c
/optee_os/core/kernel/dt.c
/optee_os/core/kernel/dt_driver.c
/optee_os/core/kernel/dt_driver_test.c
/optee_os/core/kernel/sub.mk
/optee_os/core/kernel/tee_ta_manager.c
/optee_os/core/kernel/thread.c
/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/fobj.c
libutils/ext/include/bitstring.h
/optee_os/mk/config.mk
/optee_os/ta/pkcs11/include/pkcs11_ta.h
/optee_os/ta/pkcs11/src/pkcs11_token.c
31b3101529-Mar-2023 liushiwei <liushiwei@eswincomputing.com>

build: ta: add RISC-V linker script

Sort out the common code compiled by TA,
abstract RISCV and ARM compile the common part of TA.

Signed-off-by: liushiwei <liushiwei@eswincomputing.com>
Reviewed-b

build: ta: add RISC-V linker script

Sort out the common code compiled by TA,
abstract RISCV and ARM compile the common part of TA.

Signed-off-by: liushiwei <liushiwei@eswincomputing.com>
Reviewed-by: chenchaokai <chenchaokai@eswincomputing.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/core/arch/arm/crypto/sha3_armv8a_ce.c
/optee_os/core/arch/arm/crypto/sha3_armv8a_ce_a64.S
/optee_os/core/arch/arm/crypto/sm4_armv8a_aese_a64.S
/optee_os/core/arch/arm/crypto/sm4_armv8a_ce.c
/optee_os/core/arch/arm/crypto/sm4_armv8a_ce.h
/optee_os/core/arch/arm/crypto/sm4_armv8a_ce_a64.S
/optee_os/core/arch/arm/crypto/sm4_armv8a_neon.c
/optee_os/core/arch/arm/crypto/sm4_armv8a_neon.h
/optee_os/core/arch/arm/crypto/sub.mk
/optee_os/core/arch/arm/dts/stm32mp157a-dk1.dts
/optee_os/core/arch/arm/dts/stm32mp157c-dk2.dts
/optee_os/core/arch/arm/dts/stm32mp157c-ed1.dts
/optee_os/core/arch/arm/include/kernel/secure_partition.h
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/mm/core_mmu_lpae.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/registers/imx8ulp.h
/optee_os/core/arch/arm/plat-imx/registers/imx93.h
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/crypto.mk
/optee_os/core/crypto/sm4_accel.c
/optee_os/core/crypto/sub.mk
/optee_os/core/drivers/crypto/se050/core/ecc.c
/optee_os/core/drivers/crypto/se050/crypto.mk
/optee_os/core/drivers/imx/mu/sub.mk
/optee_os/core/drivers/imx_ele.c
/optee_os/core/drivers/stm32mp15_huk.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/crypto/crypto_accel.h
/optee_os/core/include/drivers/imx_mu.h
/optee_os/core/kernel/ree_fs_ta.c
/optee_os/core/kernel/tee_ta_manager.c
/optee_os/core/lib/libtomcrypt/sha3_accel.c
/optee_os/core/lib/libtomcrypt/src/hashes/sub.mk
/optee_os/core/lib/libtomcrypt/sub.mk
/optee_os/core/lib/libtomcrypt/tomcrypt.c
/optee_os/core/pta/attestation.c
/optee_os/ldelf/ldelf.mk
/optee_os/ldelf/sub.mk
/optee_os/ldelf/syscalls_rv.S
libutee/arch/arm/sub.mk
libutee/sub.mk
libutee/tcb.c
libutee/user_ta_entry.c
libutee/user_ta_entry_compat.c
/optee_os/ta/arch/riscv/ta.ld.S
/optee_os/ta/link.mk
/optee_os/ta/link_shlib.mk
/optee_os/ta/mk/build-user-ta.mk
/optee_os/ta/ta.mk
/optee_os/ta/user_ta_header.c
28849def13-Mar-2023 Jeffrey Kardatzke <jkardatzke@google.com>

libutee: increase MPI_MEMPOOL_SIZE to 14Kb

With the Widevine v17/v18 OPKs using their new Provisioning 4.0
technique, this pool size needs to be increased to 14Kb from 12Kb.

The sequence that is be

libutee: increase MPI_MEMPOOL_SIZE to 14Kb

With the Widevine v17/v18 OPKs using their new Provisioning 4.0
technique, this pool size needs to be increased to 14Kb from 12Kb.

The sequence that is being executed that requires this is as follows:
1. TEE_GenerateKey(key_handle, 2048, NULL, 0)
2. TEE_GetObjectBufferAttribute(key, TEE_ATTR_RSA_MODULUS,
modulus_data, &modulus_len),
same for TEE_ATTR_RSA_PUBLIC_EXPONENT and
TEE_ATTR_RSA_PRIVATE_EXPONENT.
3. mbedtls_rsa_complete() on a pk object created from the extracted
modulus, public exp and private exp.

Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

41d9f6c207-Mar-2023 Jerome Forissier <jerome.forissier@linaro.org>

libutee: add TEE_ALG_ECDSA_SHA* to TEE_ALG_GET_DIGEST_SIZE()

The TEE_ALG_GET_DIGEST_SIZE() macro lacks the ECDSA algorithms. Add
them.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>

libutee: add TEE_ALG_ECDSA_SHA* to TEE_ALG_GET_DIGEST_SIZE()

The TEE_ALG_GET_DIGEST_SIZE() macro lacks the ECDSA algorithms. Add
them.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

7bd215a706-Mar-2023 Jerome Forissier <jerome.forissier@linaro.org>

core: mbedtls: ecc_get_keysize(): do not check algorithm against curve

Since commit fe2fd3ff46c0 ("GP131: Add TEE_ALG_ECDH_DERIVE_SHARED_SECRET
and TEE_ALG_ECDSA_SHA*"), the algorithm and curve valu

core: mbedtls: ecc_get_keysize(): do not check algorithm against curve

Since commit fe2fd3ff46c0 ("GP131: Add TEE_ALG_ECDH_DERIVE_SHARED_SECRET
and TEE_ALG_ECDSA_SHA*"), the algorithm and curve values are not tied
as closely as before. The GP TEE Internal Core API specification v1.3.1
mentions "ECDSA algorithm identifiers should be tied to the size of the
digest, not the key. The key size information is provided with the key
material." (Table B-2). In other words, a number of algorithm values
are valid for use with any given ECC curve. Therefore remove the
algorithm checks in ecc_get_keysize(). This function is not the proper
place anyways.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

0db2982023-Jan-2023 Clement Faure <clement.faure@nxp.com>

core: pta: imx: add manufacturing protection

Add the i.MX PTA to expose CAAM manufacturing protection features:
* Get manufacturing protection public key.
* Get manufacturing protection message.

core: pta: imx: add manufacturing protection

Add the i.MX PTA to expose CAAM manufacturing protection features:
* Get manufacturing protection public key.
* Get manufacturing protection message.
* Message signature with manufacturing protection private key.

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

f5c3d85a01-Dec-2020 Julien Masson <jmasson@baylibre.com>

core: crypto: add support MD5 hashes in RSA sign/verify/cipher

Introduce support of using MD5 hashes in RSA sign/verify/cipher
operations, which is required by AOSP Keymaster.

This is verified in

core: crypto: add support MD5 hashes in RSA sign/verify/cipher

Introduce support of using MD5 hashes in RSA sign/verify/cipher
operations, which is required by AOSP Keymaster.

This is verified in VerificationOperationsTest.RsaSuccess VTS Test [1],
which checks usage of such digests: NONE, MD5, SHA1, SHA_2_224, SHA_2_256,
SHA_2_384, SHA_2_512.

This patch has been inspired by commit[2]:

Link: [1] https://android.googlesource.com/platform/hardware/interfaces/+/master/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
Link: [2] https://github.com/OP-TEE/optee_os/commit/199d0b7310d1705661a106358f1f0b46e4c5c587 ("core: crypto: add support MD5 hashes in RSA sign/verify")
Signed-off-by: Julien Masson <jmasson@baylibre.com>
Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

a263637d10-Feb-2023 Jerome Forissier <jerome.forissier@linaro.org>

libutils: add stubs for pthread functions

When building with GCC 11.3.1 [1], the linker reports undefined symbols
in the C++ test TA:

$ make 2>&1 | grep -E "(in function|undefined reference)" | se

libutils: add stubs for pthread functions

When building with GCC 11.3.1 [1], the linker reports undefined symbols
in the C++ test TA:

$ make 2>&1 | grep -E "(in function|undefined reference)" | sed 's@.*/@@'
libstdc++.a(eh_alloc.o): in function `(anonymous namespace)::pool::free(void*) [clone .constprop.0]':
gthr-default.h:749: undefined reference to `pthread_mutex_lock'
gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
libstdc++.a(eh_alloc.o): in function `(anonymous namespace)::pool::allocate(unsigned long) [clone .constprop.0]':
gthr-default.h:749: undefined reference to `pthread_mutex_lock'
gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
libgcc_eh.a(unwind-dw2-fde-dip.o): in function `__gthread_mutex_lock':
gthr-default.h:749: undefined reference to `pthread_mutex_lock'
libgcc_eh.a(unwind-dw2-fde-dip.o): in function `__gthread_mutex_unlock':
gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
[more of the same follow]

To fix that issue, introduce no-op stubs as weak symbols in libutils.
Doing so is valid because TAs are single threaded and non-reentrant.

Link: [1] https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>

show more ...

d7f3c23c09-Feb-2023 Jens Wiklander <jens.wiklander@linaro.org>

libutee: add CNTVCT to user system registers

Adds CNTVCT to user system registers. Needed when compiling with
CFG_CORE_SEL2_SPMC=y and CFG_MEMTAG=y.

Reviewed-by: Jerome Forissier <jerome.forissier@

libutee: add CNTVCT to user system registers

Adds CNTVCT to user system registers. Needed when compiling with
CFG_CORE_SEL2_SPMC=y and CFG_MEMTAG=y.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

31c0281307-Feb-2023 Clement Faure <clement.faure@nxp.com>

libutee: add TEE_MAIN_ALGO_SHAKE values

The CAAM driver relies on TEE_ALG_GET_MAIN_ALG() macro to retrieve the
main algorithm ID from the TEE_ALG_* value.

With the addition of TEE_ALG_SHAKE128 and

libutee: add TEE_MAIN_ALGO_SHAKE values

The CAAM driver relies on TEE_ALG_GET_MAIN_ALG() macro to retrieve the
main algorithm ID from the TEE_ALG_* value.

With the addition of TEE_ALG_SHAKE128 and TEE_ALG_SHAKE256,
TEE_ALG_GET_MAIN_ALG() would return 0x01 (TEE_MAIN_ALGO_MD5) and 0x02
(TEE_MAIN_ALGO_SHA1). These returned values are wrong.

Add TEE_MAIN_ALGO_SHAKE128 and TEE_MAIN_ALGO_SHAKE256 values for
respectively TEE_ALG_SHAKE128 and TEE_ALG_SHAKE256.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

c6d054eb12-Dec-2022 Manorit Chawdhry <m-chawdhry@ti.com>

core: pta: Add K3 specific PTA for writing into extended OTP

Writing into the extended OTP has been a vendor specific thing and no
generic drivers exists for it in the OP-TEE framework.

Add a PTA t

core: pta: Add K3 specific PTA for writing into extended OTP

Writing into the extended OTP has been a vendor specific thing and no
generic drivers exists for it in the OP-TEE framework.

Add a PTA to write into the custom extended OTP bits in K3 architecture.

This header should be exported out of optee-os to be used by the host
binary for interacting with the PTA.

Includes OTP keywriting PTA header file in libutee

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

b76b229603-Feb-2023 Jerome Forissier <jerome.forissier@linaro.org>

virt: rename CFG_VIRTUALIZATION to CFG_NS_VIRTUALIZATION

With the advent of virtualization support at S-EL2 in the Armv8.4-A
architecture, CFG_VIRTUALIZATION has become ambiguous. Let's rename
it to

virt: rename CFG_VIRTUALIZATION to CFG_NS_VIRTUALIZATION

With the advent of virtualization support at S-EL2 in the Armv8.4-A
architecture, CFG_VIRTUALIZATION has become ambiguous. Let's rename
it to CFG_NS_VIRTUALIZATION to indicate more clearly that it is about
supporting virtualization on the non-secure side.

This commit is the result of the following command:

$ for f in $(git grep -l -w CFG_VIRTUALIZATION); do \
sed -i -e 's/CFG_VIRTUALIZATION/CFG_NS_VIRTUALIZATION/g' $f; \
done

...plus the compatibility line in mk/config.mk:

CFG_NS_VIRTUALIZATION ?= $(CFG_VIRTUALIZATION)

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>

show more ...

3b439c8f26-Jan-2023 Jens Wiklander <jens.wiklander@linaro.org>

GP131: Fix the TEE_ALG_SM2_PKE define

The define TEE_ALG_SM2_PKE was introduced with the value 0x80000045 in
the v1.2 specification and later changed to 0x80000046 in v1.3. At this
point we try to b

GP131: Fix the TEE_ALG_SM2_PKE define

The define TEE_ALG_SM2_PKE was introduced with the value 0x80000045 in
the v1.2 specification and later changed to 0x80000046 in v1.3. At this
point we try to be compatible with v1.3.1 so update the value to match
that version of the GlobalPlatform specification.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

b9263ec225-Jan-2023 Jens Wiklander <jens.wiklander@linaro.org>

GP131: tee_api_defines.h: remove obsolete comments

Removes the obsolete comments "/* vx.y.z spec */" from attributes, type,
and algorithm defines. The defines are all now up to date with GP
v1.3.1.

GP131: tee_api_defines.h: remove obsolete comments

Removes the obsolete comments "/* vx.y.z spec */" from attributes, type,
and algorithm defines. The defines are all now up to date with GP
v1.3.1.

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

138c510214-Dec-2022 Jens Wiklander <jens.wiklander@linaro.org>

GP131: Add TA property gpd.ta.doesNotCloseHandleOnCorruptObject

Adds the TA property gpd.ta.doesNotCloseHandleOnCorruptObject.

All syscalls operating on an object handle and can return
TEE_ERROR_CO

GP131: Add TA property gpd.ta.doesNotCloseHandleOnCorruptObject

Adds the TA property gpd.ta.doesNotCloseHandleOnCorruptObject.

All syscalls operating on an object handle and can return
TEE_ERROR_CORRUPT_OBJECT must also do special treatment when
TEE_ERROR_CORRUPT_OBJECT is returned. Prior to
gpd.ta.doesNotCloseHandleOnCorruptObject this meant removing the object
and closing the object handle. With the
gpd.ta.doesNotCloseHandleOnCorruptObject property the object handle
shouldn't be close if this the current TA has the property set to true.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

1bc176d816-Dec-2022 Jens Wiklander <jens.wiklander@linaro.org>

GP131: TEE_Asymmetric{En,De}crypt() add return codes

Adds TEE_ERROR_CIPHERTEXT_INVALID and TEE_ERROR_NOT_SUPPORTED to the
list of supported return code for TEE_AsymmetricEncrypt() and
TEE_Asymmetric

GP131: TEE_Asymmetric{En,De}crypt() add return codes

Adds TEE_ERROR_CIPHERTEXT_INVALID and TEE_ERROR_NOT_SUPPORTED to the
list of supported return code for TEE_AsymmetricEncrypt() and
TEE_AsymmetricDecrypt().

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

6214424f15-Dec-2022 Jens Wiklander <jens.wiklander@linaro.org>

GP131: add TEE_BigIntExpMod()

Adds the function TEE_BigIntExpMod() introduced in TEE Internal Core API
v1.2.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklande

GP131: add TEE_BigIntExpMod()

Adds the function TEE_BigIntExpMod() introduced in TEE Internal Core API
v1.2.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

3be980f715-Dec-2022 Jens Wiklander <jens.wiklander@linaro.org>

GP131: add TEE_BigIntAbs()

Adds the function TEE_BigIntAbs() introduced in TEE Internal Core API
v1.2.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jen

GP131: add TEE_BigIntAbs()

Adds the function TEE_BigIntAbs() introduced in TEE Internal Core API
v1.2.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

4202329515-Dec-2022 Jens Wiklander <jens.wiklander@linaro.org>

GP131: add TEE_BigIntSetBit()

Adds the function TEE_BigIntSetBit() introduced in TEE Internal Core API
v1.2.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklande

GP131: add TEE_BigIntSetBit()

Adds the function TEE_BigIntSetBit() introduced in TEE Internal Core API
v1.2.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

af4bcf3415-Dec-2022 Jens Wiklander <jens.wiklander@linaro.org>

GP131: add TEE_BigIntAssign()

Adds the function TEE_BigIntAssign() introduced in TEE Internal Core API
v1.2.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklande

GP131: add TEE_BigIntAssign()

Adds the function TEE_BigIntAssign() introduced in TEE Internal Core API
v1.2.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

287a618215-Dec-2022 Jens Wiklander <jens.wiklander@linaro.org>

GP131: Update TEE_SetOperationKey*()

Update TEE_SetOperationKey() and TEE_SetOperationKey2() according to TEE
Internal Core API version 1.3.1.

Compatibility functions for v1.1 are added due an inco

GP131: Update TEE_SetOperationKey*()

Update TEE_SetOperationKey() and TEE_SetOperationKey2() according to TEE
Internal Core API version 1.3.1.

Compatibility functions for v1.1 are added due an incompatible change
highlighted by the GP compliance test suite. Prior to 1.3 the functions
where should panic if operation state isn't "initial", in 1.3 they are
instead required to always reset the operation state to "initial".

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

12345678910>>...36