History log of /optee_os/lib/ (Results 251 – 275 of 883)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
ede83d7202-May-2022 Jerome Forissier <jerome.forissier@linaro.org>

libutee: fix value of TEE_ECC_CURVE_SM2

The GlobalPlatform TEE Interbal Core API specification v1.3 has the
following text:

In TEE Internal Core API v1.2 and v1.2.1, TEE_ECC_CURVE_25519 and
TEE_E

libutee: fix value of TEE_ECC_CURVE_SM2

The GlobalPlatform TEE Interbal Core API specification v1.3 has the
following text:

In TEE Internal Core API v1.2 and v1.2.1, TEE_ECC_CURVE_25519 and
TEE_ECC_CURVE_SM2 were incorrectly assigned the same identifier.

Indeed, both were 0x00000300. In v1.3, TEE_ECC_CURVE_SM2 is now
0x00000400. Update the code accordingly.

This is an API and ABI change, but note that this value is used only
in TEE_IsAlgorithmSupported(). Therefore, only TAs that dynamically
check for algorithm support at runtime may be impacted. This change
was tested on QEMUv8 by running "old" TAs (built without this commit)
with a "newer" OP-TEE OS (including this commit), that is:
- 'make run' and run 'xtest'
- apply this change
- 'make arm-tf && make run-only' and run 'xtest' again. No errors.

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

show more ...

f21d4ead04-May-2022 Jens Wiklander <jens.wiklander@linaro.org>

libutils: fix MTE error in realloc()

With memory tagging realloc() should only untag the old buffer if the
allocation of a new buffer is successful.

The implementation of realloc() prior to this pa

libutils: fix MTE error in realloc()

With memory tagging realloc() should only untag the old buffer if the
allocation of a new buffer is successful.

The implementation of realloc() prior to this patch is based on bgetr().
This is not so convenient with MTE enabled since the old buffer must be
untagged before calling bgetr(). If realloc() fails the memory tags must
be restored, but this was not done.

Restoring the tags is made somewhat more complicated by the fact that
the size reported by bget_buf_size() may actually be larger than the
size of the tagged buffer. Memalign() is sometimes forced to allocate
buffers larger than requested in order to honor the requested alignment.

So instead of using bgetr(), realloc() is implemented using bget(),
memcpy(), memset() and brel() as needed. This is the same thing that
bgetr() did, except that the old buffer is not untagged until a new
buffer has been successfully allocated.

Fixes: 08a5c4f9ae42 ("libutils: add MTE support in malloc() and friends")
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_armv8a gp_20056)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

08a5c4f912-Apr-2022 Jens Wiklander <jens.wiklander@linaro.org>

libutils: add MTE support in malloc() and friends

Adds support for memory tagging using the hardware assisted Armv8.5-A
Memory Tagging Extension in malloc() and friends.

When allocating memory the

libutils: add MTE support in malloc() and friends

Adds support for memory tagging using the hardware assisted Armv8.5-A
Memory Tagging Extension in malloc() and friends.

When allocating memory the acquired memory range in tagged a special
pointer with the tag coded in the top bits of the pointer. Accessing
this memory without the coded tag will result in a Tag Check Exception.

MTE is enabled for both OP-TEE core and TAs at the same time with
CFG_MEMTAG=y.

When the memory is freed it's untagged again. All accesses to heap
memory using old/stale pointers will be caught. This is an efficient
method to catch use-after-free and buffer overruns on the heap. The
buffer overruns are limited in granularity to blocks of 16 bytes.
However, the heap itself is also managed in blocks of 16 bytes so
smaller buffer overruns will not damage the heap.

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

show more ...

a0e8ffe904-Apr-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: add support for MTE

Adds support for the Armv8.5-A Memory Tagging Extension with
CFG_MEMTAG=y.

A memtag.h API is introduced to handle this extension. If CFG_MEMTAG=n
the API doesn't add any o

core: add support for MTE

Adds support for the Armv8.5-A Memory Tagging Extension with
CFG_MEMTAG=y.

A memtag.h API is introduced to handle this extension. If CFG_MEMTAG=n
the API doesn't add any overhead and the behaviour is unchanged. With
CFG_MEMTAG=y a check is performed to see if the platform can support MTE
and the API is dynamically configured accordingly. This means that it's
safe to have CFG_MEMTAG=y even for platforms not supporting MTE. There
will be some minimal overhead then, but likely not noticeable.

An entry is also added in the TEE_PROPSET_TEE_IMPLEMENTATION for a u32
property "org.trustedfirmware.optee.cpu.feat_memtag_implemented". The
property is set to a non-zero value only if CFG_CORE_MEMTAG is
configured and the underlying CPU supports FEAT_MTE.

This commit still only uses the default tag with the value 0 resulting
in unchanged pointers when accessing memory. However, all plumbing is in
place allowing for instance tagging of the heap in a later commit.

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

show more ...

5cc0898529-Apr-2022 Jens Wiklander <jens.wiklander@linaro.org>

libutee: arm64: add read_dczid_el0()

Adds read_dczid_el0() to read Data Cache Zero ID register.

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

libutee: arm64: add read_dczid_el0()

Adds read_dczid_el0() to read Data Cache Zero ID register.

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

show more ...

466162e212-Apr-2022 Jens Wiklander <jens.wiklander@linaro.org>

libutils: refactor heap tagging

Refactors the heap tagging with CFG_CORE_SANITIZE_KADDRESS to use two new
hooks maybe_tag_buf() and maybe_untag_buf().

maybe_tag_buf() is called from raw_malloc_retu

libutils: refactor heap tagging

Refactors the heap tagging with CFG_CORE_SANITIZE_KADDRESS to use two new
hooks maybe_tag_buf() and maybe_untag_buf().

maybe_tag_buf() is called from raw_malloc_return_hook() which is called
after bget(). maybe_untag_buf() is called before brel() is called.

This removes some of the local modifications to bget.c.

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

show more ...

f0ef3bea26-Apr-2022 Sumit Garg <sumit.garg@linaro.org>

ftrace: Refactor ftrace buffer dump implementation

Current implementation does a lot of tricky bits with ftrace buffer
pointer. It also leads to false positive -Warray-bounds warnings with
GCC 11.2

ftrace: Refactor ftrace buffer dump implementation

Current implementation does a lot of tricky bits with ftrace buffer
pointer. It also leads to false positive -Warray-bounds warnings with
GCC 11.2 toolchain as well. So refactor it to use array indexes instead.
Also, move hardcoded ftrace line sizes to macros instead for better
understanding.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_armv8a)

show more ...


/optee_os/.azure-pipelines.yml
/optee_os/CHANGELOG.md
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/include/arm.h
/optee_os/core/arch/arm/include/kernel/thread_arch.h
/optee_os/core/arch/arm/include/kernel/thread_private_arch.h
/optee_os/core/arch/arm/kernel/asm-defines.c
/optee_os/core/arch/arm/kernel/secure_partition.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/mm/core_mmu_lpae.c
/optee_os/core/arch/arm/mm/core_mmu_v7.c
/optee_os/core/arch/arm/plat-aspeed/platform_ast2600.c
/optee_os/core/arch/arm/plat-imx/crypto_conf.mk
/optee_os/core/arch/arm/plat-imx/drivers/tzc380.c
/optee_os/core/arch/arm/plat-imx/registers/imx6.h
/optee_os/core/arch/arm/plat-imx/registers/imx7.h
/optee_os/core/arch/arm/plat-imx/registers/imx8m-crm.h
/optee_os/core/arch/arm/plat-imx/registers/imx8m.h
/optee_os/core/arch/arm/plat-k3/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-rockchip/platform_config.h
/optee_os/core/arch/arm/plat-sprd/main.c
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pmic.c
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-stm32mp1/scmi_server.c
/optee_os/core/arch/arm/plat-synquacer/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/conf.mk
/optee_os/core/arch/arm/plat-versal/main.c
/optee_os/core/arch/arm/plat-versal/platform_config.h
/optee_os/core/arch/arm/plat-versal/sub.mk
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/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/drivers/clk/clk_dt.c
/optee_os/core/drivers/crypto/aspeed/hace_ast2600.c
/optee_os/core/drivers/crypto/aspeed/hace_ast2600.h
/optee_os/core/drivers/crypto/caam/caam_ctrl.c
/optee_os/core/drivers/crypto/caam/caam_jr.c
/optee_os/core/drivers/crypto/caam/hal/common/hal_jr.c
/optee_os/core/drivers/crypto/caam/utils/utils_dmaobj.c
/optee_os/core/drivers/crypto/caam/utils/utils_mem.c
/optee_os/core/drivers/crypto/crypto_api/cipher/cipher.c
/optee_os/core/drivers/crypto/crypto_api/math/modulus.c
/optee_os/core/drivers/imx_i2c.c
/optee_os/core/drivers/stpmic1.c
/optee_os/core/drivers/sub.mk
/optee_os/core/drivers/tpm2/sub.mk
/optee_os/core/drivers/tpm2/tpm2_chip.c
/optee_os/core/drivers/tpm2/tpm2_cmd.c
/optee_os/core/drivers/tpm2/tpm2_mmio.c
/optee_os/core/drivers/tpm2/tpm2_ptp_fifo.c
/optee_os/core/drivers/tzc380.c
/optee_os/core/include/drivers/stpmic1.h
/optee_os/core/include/drivers/stpmic1_regulator.h
/optee_os/core/include/drivers/tpm2_chip.h
/optee_os/core/include/drivers/tpm2_cmd.h
/optee_os/core/include/drivers/tpm2_mmio.h
/optee_os/core/include/drivers/tpm2_ptp_fifo.h
/optee_os/core/include/dt-bindings/regulator/st,stm32mp15-regulator.h
/optee_os/core/include/io.h
/optee_os/core/include/kernel/tpm.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/include/tpm2.h
/optee_os/core/kernel/dt_driver.c
/optee_os/core/kernel/tee_ta_manager.c
/optee_os/core/kernel/tpm.c
/optee_os/core/mm/core_mmu.c
/optee_os/core/tee/tee_rpmb_fs.c
libutils/ext/ftrace/ftrace.c
/optee_os/mk/aosp_optee.mk
/optee_os/mk/clang.mk
/optee_os/mk/config.mk
/optee_os/scripts/get_maintainer.py
/optee_os/ta/pkcs11/src/pkcs11_attributes.c
/optee_os/ta/pkcs11/src/processing_symm.c
/optee_os/ta/pkcs11/src/token_capabilities.c
d783b68119-Nov-2021 Etienne Carriere <etienne.carriere@linaro.org>

core: dt_driver: drivers to test probe deferral

Implements driver providers for some emulated resource (clocks and reset
controllers), consumer drivers and a embedded test DTSI file to
test the DT_D

core: dt_driver: drivers to test probe deferral

Implements driver providers for some emulated resource (clocks and reset
controllers), consumer drivers and a embedded test DTSI file to
test the DT_DRIVER probe sequence.

The driver consumer run few tests and logs results locally. The
result participates in core self test result reported by the
PTA test interface.

One can test with vexpress platform flavor qemu_virt and qemu_v8 using,
for example, the build instruction below:
make PLATFORM=vexpress-qemu_virt \
CFG_DT_DRIVER_EMBEDDED_TEST=y \
CFG_EMBED_DTB_SOURCE_FILE=embedded_dtb_test.dts

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

show more ...


/optee_os/MAINTAINERS
/optee_os/Makefile
/optee_os/core/arch/arm/dts/dt_driver_test.dtsi
/optee_os/core/arch/arm/dts/embedded_dtb_test.dts
/optee_os/core/arch/arm/dts/stm32mp151.dtsi
/optee_os/core/arch/arm/dts/stm32mp157c-ed1.dts
/optee_os/core/arch/arm/dts/stm32mp15xx-dkx.dtsi
/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/spmc_sp_handler.c
/optee_os/core/arch/arm/mm/sp_mem.c
/optee_os/core/arch/arm/plat-aspeed/platform_ast2600.c
/optee_os/core/arch/arm/plat-imx/link.mk
/optee_os/core/arch/arm/plat-imx/registers/imx8q.h
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-stm32mp1/platform_config.h
/optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h
/optee_os/core/drivers/clk/clk-stm32-core.c
/optee_os/core/drivers/clk/clk-stm32-core.h
/optee_os/core/drivers/clk/clk-stm32mp13.c
/optee_os/core/drivers/clk/clk_dt.c
/optee_os/core/drivers/clk/sub.mk
/optee_os/core/drivers/crypto/stm32/stm32_cryp.c
/optee_os/core/drivers/crypto/stm32/stm32_cryp.h
/optee_os/core/drivers/stm32_iwdg.c
/optee_os/core/drivers/stm32_tamp.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/stm32_iwdg.h
/optee_os/core/include/drivers/stm32_tamp.h
/optee_os/core/include/drivers/stm32mp13_rcc.h
/optee_os/core/include/drivers/stm32mp_dt_bindings.h
/optee_os/core/include/dt-bindings/clock/stm32mp13-clks.h
/optee_os/core/include/dt-bindings/clock/stm32mp13-clksrc.h
/optee_os/core/include/dt-bindings/reset/stm32mp13-resets.h
/optee_os/core/include/kernel/dt.h
/optee_os/core/include/kernel/dt_driver.h
/optee_os/core/include/mm/sp_mem.h
/optee_os/core/kernel/dt.c
/optee_os/core/kernel/dt_driver_test.c
/optee_os/core/kernel/sub.mk
/optee_os/core/pta/tests/invoke.c
/optee_os/core/pta/tests/misc.c
/optee_os/core/pta/tests/misc.h
/optee_os/core/sub.mk
/optee_os/core/tee/tee_svc_cryp.c
libutee/include/pta_invoke_tests.h
/optee_os/mk/config.mk
/optee_os/scripts/ts_bin_to_c.py
613122b109-Mar-2022 Jerome Forissier <jerome@forissier.org>

core: mbedtls: sm2: fix SM2 key generation

ecc_get_keysize() lacks a case for TEE_ECC_CURVE_SM2, which prevents the
generation of a SM2 key pair. Fix this.

Signed-off-by: Jerome Forissier <jerome@f

core: mbedtls: sm2: fix SM2 key generation

ecc_get_keysize() lacks a case for TEE_ECC_CURVE_SM2, which prevents the
generation of a SM2 key pair. Fix this.

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

show more ...

5e5dcaf209-Mar-2022 Jerome Forissier <jerome@forissier.org>

core: mbedtls: add curve type to domain parameter group ID conversion

MBedTLS functions mbedtls_ecp_group_load() and mbedtls_ecdsa_genkey()
take a group ID parameter of type mbedtls_ecp_group_id whi

core: mbedtls: add curve type to domain parameter group ID conversion

MBedTLS functions mbedtls_ecp_group_load() and mbedtls_ecdsa_genkey()
take a group ID parameter of type mbedtls_ecp_group_id which is an enum
(MBEDTLS_ECP_DP_SECP192R1, etc.). The code in lib/libmbedtls/core/ecc.c
incorrectly passes a uint32_t TEE curve ID instead
(TEE_ECC_CURVE_NIST_P192, etc.). By chance the values happen to be the
same for all the NIST curves, but not for SM2. Fix that by introducing a
conversion function.

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

show more ...

e231582f09-Mar-2022 Jerome Forissier <jerome@forissier.org>

core: mbedtls: sm2: set curve by default when key type is SM2

crypto_asym_alloc_ecc_keypair() and crypto_asym_alloc_ecc_public_key()
should set the curve field of the ecc_key structure to TEE_ECC_CU

core: mbedtls: sm2: set curve by default when key type is SM2

crypto_asym_alloc_ecc_keypair() and crypto_asym_alloc_ecc_public_key()
should set the curve field of the ecc_key structure to TEE_ECC_CURVE_SM2
when the key type is one of TEE_TYPE_SM2_{DSA,KEP,PKE}_KEYPAIR because
the user is not supposed to provide any TEE_ATTR_ECC_CURVE attribute,
contrary to other ECC algorithms.

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

show more ...

7e05ec2527-Oct-2021 Jerome Forissier <jerome@forissier.org>

core: pta: add remote attestation PTA

Add a PTA to perform remote attestation of user space TAs and TEE core
memory. Enabled with CFG_ATTESTATION_PTA=y. Four commands are defined:

- PTA_ATTESTATION

core: pta: add remote attestation PTA

Add a PTA to perform remote attestation of user space TAs and TEE core
memory. Enabled with CFG_ATTESTATION_PTA=y. Four commands are defined:

- PTA_ATTESTATION_GET_PUBKEY

Returns the public RSA key used to sign the measurements generated by
the other commands. The key pair is generated on first call (any
command) and saved to secure storage. It is therefore device-specific.

- PTA_ATTESTATION_GET_TA_SHDR_DIGEST

Returns the digest found in the secure header (struct shdr) of a TA
or trusted shared library given its UUID.

- PTA_ATTESTATION_HASH_TA_MEMORY

This command must be called by a user space TA (not a CA). It computes
a hash of the memory pages that belong to the caller and contain code
or read-only data. This hash is therefore a runtime measurement of the
TA execution environment, including shared libraries (if any). It can be
used to remotely attest that the device is running untampered TA code.

- PTA_ATTESTATION_HASH_TEE_MEMORY

Returns a hash of the TEE OS core (.text and .rodata sections, less the
small part of .text that may be modified at boot). Similar to
PTA_ATTESTATION_HASH_TA_MEMORY, the hash is computed each time the
command is called, so that the result reflects the actual memory
content.

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

show more ...

487f8cd201-Feb-2022 Jerome Forissier <jerome@forissier.org>

core: compiler.h: introduce __relrodata_unpaged(x)

Introduce macro __relrodata_unpaged(x) to mark data that need to be
unpaged and are essentially read-only but may contain relocations when
ASLR is

core: compiler.h: introduce __relrodata_unpaged(x)

Introduce macro __relrodata_unpaged(x) to mark data that need to be
unpaged and are essentially read-only but may contain relocations when
ASLR is enabled, hence "relocatable read-only". When ASLR is turned off,
the macro is identical to __rodata_unpaged(x). When ASLR is on however,
the data is emitted in section .data.rel.ro.__unpaged.x which is later
gathered by the linker file into the output section .data.rel.ro which
is mapped read only at runtime (after relocations are processed) and
is also unpaged (when pager is enabled).

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

show more ...


/optee_os/core/arch/arm/dts/sama5d2.dtsi
/optee_os/core/arch/arm/include/kernel/thread_arch.h
/optee_os/core/arch/arm/include/optee_ffa.h
/optee_os/core/arch/arm/include/sm/optee_smc.h
/optee_os/core/arch/arm/kernel/asm-defines.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/link_dummy.ld
/optee_os/core/arch/arm/kernel/thread.c
/optee_os/core/arch/arm/kernel/thread_a64.S
/optee_os/core/arch/arm/kernel/thread_optee_smc.c
/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/mm/core_mmu_lpae.c
/optee_os/core/arch/arm/mm/core_mmu_v7.c
/optee_os/core/arch/arm/mm/mobj_dyn_shm.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/mm/sp_mem.c
/optee_os/core/arch/arm/mm/tee_pager.c
/optee_os/core/arch/arm/plat-imx/imx-common.c
/optee_os/core/arch/arm/plat-imx/pm/pm-imx7.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-ti/a9_plat_init.S
/optee_os/core/arch/arm/tee/entry_fast.c
/optee_os/core/drivers/atmel_rtc.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/kernel/boot.h
/optee_os/core/include/kernel/linker.h
/optee_os/core/include/kernel/thread_private.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/include/mm/mobj.h
/optee_os/core/include/mm/tee_mmu_types.h
/optee_os/core/include/scattered_array.h
/optee_os/core/kernel/thread.c
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/mobj.c
/optee_os/core/mm/vm.c
/optee_os/core/tee/entry_std.c
libutils/ext/include/compiler.h
/optee_os/scripts/gen_tee_bin.py
cea1eb0b09-Feb-2022 Clément Léger <clement.leger@bootlin.com>

pta: add PTA for RTC

On some systems, when the RTC is secured, there is no way for the
normal world to access it. This PTA uses the RTC API to allow a
Linux OP-TEE based RTC driver to communicate wi

pta: add PTA for RTC

On some systems, when the RTC is secured, there is no way for the
normal world to access it. This PTA uses the RTC API to allow a
Linux OP-TEE based RTC driver to communicate with the RTC that is
secured.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>

show more ...

9da55c8d23-Feb-2022 Jerome Forissier <jerome@forissier.org>

libutee: TEE_{Create,Open}PersistentObject() should accept NULL object ID

Passing a NULL objectId to TEE_CreatePersistentObject() or
TEE_OpenPersistentObject() should be allowed as long as objectIdL

libutee: TEE_{Create,Open}PersistentObject() should accept NULL object ID

Passing a NULL objectId to TEE_CreatePersistentObject() or
TEE_OpenPersistentObject() should be allowed as long as objectIdLen is
zero. Indeed, a zero-size object identifier is valid as per the
description of TEE_RenamePersistentObject(). In addition, "a Trusted
Application SHALL NOT pass the NULL pointer in an [in] parameter, except
perhaps if the buffer size is zero". Thus (NULL, 0) is valid.

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 ...


/optee_os/core/arch/arm/kernel/thread_optee_smc.c
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/plat-aspeed/platform_ast2600.c
/optee_os/core/arch/arm/plat-aspeed/platform_config.h
/optee_os/core/arch/arm/plat-imx/drivers/imx_csu.c
/optee_os/core/arch/arm/plat-imx/main.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-ls/platform_config.h
/optee_os/core/arch/arm/plat-rcar/conf.mk
/optee_os/core/arch/arm/plat-rcar/main.c
/optee_os/core/arch/arm/plat-rcar/platform_config.h
/optee_os/core/arch/arm/plat-rcar/sub.mk
/optee_os/core/arch/arm/plat-rockchip/main.c
/optee_os/core/arch/arm/plat-rzn1/main.c
/optee_os/core/arch/arm/plat-stm/main.c
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/drivers/sub.mk
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-stm32mp1/scmi_server.c
/optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h
/optee_os/core/arch/arm/plat-sunxi/main.c
/optee_os/core/arch/arm/plat-ti/main.c
/optee_os/core/arch/arm/plat-vexpress/main.c
/optee_os/core/arch/arm/plat-zynq7k/main.c
/optee_os/core/drivers/crypto/aspeed/crypto_ast2600.c
/optee_os/core/drivers/crypto/aspeed/hace_ast2600.c
/optee_os/core/drivers/crypto/aspeed/hace_ast2600.h
/optee_os/core/drivers/crypto/aspeed/sub.mk
/optee_os/core/drivers/crypto/crypto_api/acipher/rsassa.c
/optee_os/core/drivers/crypto/se050/session.c
/optee_os/core/drivers/crypto/stm32/stm32_cryp.c
/optee_os/core/drivers/crypto/stm32/stm32_cryp.h
/optee_os/core/drivers/crypto/sub.mk
/optee_os/core/drivers/gic.c
/optee_os/core/drivers/rstctrl/stm32_rstctrl.c
/optee_os/core/drivers/rstctrl/sub.mk
/optee_os/core/drivers/stm32_gpio.c
/optee_os/core/include/drivers/gic.h
/optee_os/core/include/drivers/stm32mp1_rcc.h
/optee_os/core/include/tee/entry_std.h
/optee_os/core/kernel/notif.c
/optee_os/core/mm/mobj.c
/optee_os/core/mm/vm.c
/optee_os/core/tee/entry_std.c
/optee_os/core/tee/fs_dirfile.c
/optee_os/core/tee/tee_svc_storage.c
libutee/tee_api_objects.c
/optee_os/ta/pkcs11/include/pkcs11_ta.h
/optee_os/ta/pkcs11/src/pkcs11_attributes.c
/optee_os/ta/pkcs11/src/processing.c
/optee_os/ta/pkcs11/src/processing.h
/optee_os/ta/pkcs11/src/processing_asymm.c
/optee_os/ta/pkcs11/src/processing_ec.c
/optee_os/ta/pkcs11/src/token_capabilities.c
4516e38d14-Feb-2022 Jens Wiklander <jens.wiklander@linaro.org>

assert.h: add static_assert

Adds the static_assert macro from C11.

Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens W

assert.h: add static_assert

Adds the static_assert macro from C11.

Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

7124d49728-Dec-2021 Marouene Boubakri <marouene.boubakri@nxp.com>

lib: libutils: compiler.h: set trailing comment according to target

In GNU assembler the comment character is target specific. GNU AS for
risc-v complains about '/' not recognized as character, ther

lib: libutils: compiler.h: set trailing comment according to target

In GNU assembler the comment character is target specific. GNU AS for
risc-v complains about '/' not recognized as character, therefore,
replace it with '#' to avoid errors.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


/optee_os/.azure-pipelines.yml
/optee_os/Makefile
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/dts/at91-sama5d27_som1_ek.dts
/optee_os/core/arch/arm/dts/at91-sama5d2_xplained.dts
/optee_os/core/arch/arm/dts/sama5d2.dtsi
/optee_os/core/arch/arm/include/arm32.h
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/include/kernel/boot.h
/optee_os/core/arch/arm/include/kernel/misc.h
/optee_os/core/arch/arm/include/kernel/thread_arch.h
/optee_os/core/arch/arm/include/kernel/thread_private_arch.h
/optee_os/core/arch/arm/include/kernel/thread_spmc.h
/optee_os/core/arch/arm/include/mm/core_mmu_arch.h
/optee_os/core/arch/arm/kernel/abort.c
/optee_os/core/arch/arm/kernel/asm-defines.c
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/delay.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/link_dummies_paged.c
/optee_os/core/arch/arm/kernel/misc_a32.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/stmm_sp.c
/optee_os/core/arch/arm/kernel/sub.mk
/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.c
/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/thread_spmc_a32.S
/optee_os/core/arch/arm/kernel/thread_spmc_a64.S
/optee_os/core/arch/arm/mm/core_mmu.c
/optee_os/core/arch/arm/mm/core_mmu_lpae.c
/optee_os/core/arch/arm/mm/core_mmu_v7.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-sam/freq.c
/optee_os/core/arch/arm/plat-sam/nsec-service/sm_platform_handler.c
/optee_os/core/arch/arm/plat-sam/nsec-service/smc_ids.h
/optee_os/core/arch/arm/plat-sam/nsec-service/sub.mk
/optee_os/core/arch/arm/plat-sam/sub.mk
/optee_os/core/arch/arm/plat-vexpress/main.c
/optee_os/core/arch/arm/sm/sm.c
/optee_os/core/drivers/atmel_wdt.c
/optee_os/core/drivers/crypto/caam/include/caam_desc_defines.h
/optee_os/core/drivers/crypto/caam/include/caam_desc_helper.h
/optee_os/core/drivers/pm/sam/at91_pm.c
/optee_os/core/drivers/sub.mk
/optee_os/core/drivers/wdt/sub.mk
/optee_os/core/drivers/wdt/watchdog.c
/optee_os/core/drivers/wdt/watchdog_sm.c
/optee_os/core/include/drivers/pm/sam/atmel_pm.h
/optee_os/core/include/drivers/wdt.h
/optee_os/core/include/kernel/abort.h
/optee_os/core/include/kernel/asan.h
/optee_os/core/include/kernel/spinlock.h
/optee_os/core/include/kernel/thread.h
/optee_os/core/include/kernel/thread_private.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/include/mm/mobj.h
/optee_os/core/include/mm/pgt_cache.h
/optee_os/core/include/mm/tee_pager.h
/optee_os/core/kernel/spin_lock_debug.c
/optee_os/core/kernel/sub.mk
/optee_os/core/kernel/thread.c
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/sub.mk
/optee_os/core/mm/vm.c
libutils/ext/include/compiler.h
/optee_os/mk/config.mk
ed227bc621-Dec-2021 Marouene Boubakri <marouene.boubakri@nxp.com>

lib: libutils: isoc: remove unused thread.h from bget_malloc.c

This commit removes thread.h from lib/libutils/isoc/bget_malloc.c since
it is not used, but also to eliminate the dependency between ge

lib: libutils: isoc: remove unused thread.h from bget_malloc.c

This commit removes thread.h from lib/libutils/isoc/bget_malloc.c since
it is not used, but also to eliminate the dependency between generic
libraries code and architecture-specific core functions.

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

show more ...

c6c416f110-Jan-2022 Ruchika Gupta <ruchika.gupta@linaro.org>

ldelf: strip PAC from TA addresses

When pointer authentication is enables for TA's, the LR values
saved in the stack will have PAC which must be stripped off
when unwinding the stack.

Signed-off-by

ldelf: strip PAC from TA addresses

When pointer authentication is enables for TA's, the LR values
saved in the stack will have PAC which must be stripped off
when unwinding the stack.

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

show more ...


/optee_os/.azure-pipelines.yml
/optee_os/CHANGELOG.md
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/dts/sama5d2.dtsi
/optee_os/core/arch/arm/include/arm.h
/optee_os/core/arch/arm/include/arm32_macros.S
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/include/arm64_macros.S
/optee_os/core/arch/arm/include/kernel/boot.h
/optee_os/core/arch/arm/include/kernel/spmc_sp_handler.h
/optee_os/core/arch/arm/include/kernel/thread.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/link.mk
/optee_os/core/arch/arm/kernel/link_dummy.ld
/optee_os/core/arch/arm/kernel/spmc_sp_handler.c
/optee_os/core/arch/arm/kernel/stmm_sp.c
/optee_os/core/arch/arm/kernel/thread.c
/optee_os/core/arch/arm/kernel/thread_a64.S
/optee_os/core/arch/arm/kernel/thread_optee_smc.c
/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/mm/core_mmu.c
/optee_os/core/arch/arm/mm/mobj_dyn_shm.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/plat-aspeed/conf.mk
/optee_os/core/arch/arm/plat-aspeed/core_pos_a32.S
/optee_os/core/arch/arm/plat-aspeed/platform_ast2600.c
/optee_os/core/arch/arm/plat-aspeed/platform_config.h
/optee_os/core/arch/arm/plat-aspeed/sub.mk
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/crypto_conf.mk
/optee_os/core/arch/arm/plat-imx/imx-common.c
/optee_os/core/arch/arm/plat-imx/imx-regs.h
/optee_os/core/arch/arm/plat-imx/imx.h
/optee_os/core/arch/arm/plat-imx/registers/imx7ulp.h
/optee_os/core/arch/arm/plat-imx/registers/imx8ulp-crm.h
/optee_os/core/arch/arm/plat-imx/registers/imx8ulp.h
/optee_os/core/arch/arm/plat-ls/crypto_conf.mk
/optee_os/core/arch/arm/plat-ls/platform_config.h
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-sam/main.c
/optee_os/core/arch/arm/plat-sam/matrix.c
/optee_os/core/arch/arm/plat-sam/pm/psci.c
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pmic.c
/optee_os/core/arch/arm/plat-stm32mp1/drivers/sub.mk
/optee_os/core/arch/arm/plat-stm32mp1/link_dummies_paged.c
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-stm32mp1/scmi_server.c
/optee_os/core/arch/arm/plat-stm32mp1/shared_resources.c
/optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h
/optee_os/core/arch/arm/plat-stm32mp1/sub.mk
/optee_os/core/arch/arm/plat-zynqmp/conf.mk
/optee_os/core/arch/arm/plat-zynqmp/main.c
/optee_os/core/arch/arm/plat-zynqmp/platform_config.h
/optee_os/core/arch/arm/sm/pm_a32.S
/optee_os/core/drivers/atmel_rstc.c
/optee_os/core/drivers/atmel_shdwc.c
/optee_os/core/drivers/atmel_trng.c
/optee_os/core/drivers/clk/clk-stm32mp15.c
/optee_os/core/drivers/clk/sam/at91_clk.h
/optee_os/core/drivers/clk/sam/at91_generated.c
/optee_os/core/drivers/clk/sam/at91_peripheral.c
/optee_os/core/drivers/clk/sam/at91_pmc.c
/optee_os/core/drivers/clk/sam/at91_programmable.c
/optee_os/core/drivers/clk/sam/sama5d2_clk.c
/optee_os/core/drivers/clk/sub.mk
/optee_os/core/drivers/crypto/caam/hal/common/hal_jr.c
/optee_os/core/drivers/crypto/caam/hal/imx_8ulp/hal_clk.c
/optee_os/core/drivers/crypto/caam/hal/imx_8ulp/hal_ctrl.c
/optee_os/core/drivers/crypto/caam/hal/imx_8ulp/hal_jr.c
/optee_os/core/drivers/crypto/caam/hal/imx_8ulp/registers/ctrl_regs.h
/optee_os/core/drivers/crypto/caam/hal/imx_8ulp/sub.mk
/optee_os/core/drivers/crypto/caam/hal/sub.mk
/optee_os/core/drivers/crypto/caam/include/caam_common.h
/optee_os/core/drivers/crypto/caam/utils/utils_mem.c
/optee_os/core/drivers/crypto/crypto_api/acipher/rsa.c
/optee_os/core/drivers/crypto/se050/adaptors/sub.mk
/optee_os/core/drivers/crypto/se050/core/ecc.c
/optee_os/core/drivers/crypto/se050/core/rsa.c
/optee_os/core/drivers/crypto/se050/core/sub.mk
/optee_os/core/drivers/crypto/se050/crypto.mk
/optee_os/core/drivers/crypto/se050/sub.mk
/optee_os/core/drivers/imx_lpuart.c
/optee_os/core/drivers/imx_uart.c
/optee_os/core/drivers/imx_wdog.c
/optee_os/core/drivers/pl011.c
/optee_os/core/drivers/pm/sam/at91_pm.c
/optee_os/core/drivers/pm/sam/at91_pm.h
/optee_os/core/drivers/pm/sam/pm-defines.c
/optee_os/core/drivers/pm/sam/pm_resume.S
/optee_os/core/drivers/pm/sam/pm_suspend.S
/optee_os/core/drivers/pm/sam/sub.mk
/optee_os/core/drivers/pm/sub.mk
/optee_os/core/drivers/rstctrl/rstctrl.c
/optee_os/core/drivers/rstctrl/sub.mk
/optee_os/core/drivers/serial8250_uart.c
/optee_os/core/drivers/stm32_gpio.c
/optee_os/core/drivers/stm32_i2c.c
/optee_os/core/drivers/stm32_rng.c
/optee_os/core/drivers/stm32_uart.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/clk_dt.h
/optee_os/core/include/drivers/pm/sam/atmel_pm.h
/optee_os/core/include/drivers/rstctrl.h
/optee_os/core/include/drivers/stm32_i2c.h
/optee_os/core/include/drivers/stm32_uart.h
/optee_os/core/include/drivers/stm32mp1_rcc.h
/optee_os/core/include/io.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/pm.h
/optee_os/core/include/kernel/user_mode_ctx_struct.h
/optee_os/core/include/mm/mobj.h
/optee_os/core/kernel/dt.c
/optee_os/core/kernel/dt_driver.c
/optee_os/core/kernel/msg_param.c
/optee_os/core/kernel/pseudo_ta.c
/optee_os/core/kernel/ree_fs_ta.c
/optee_os/core/kernel/user_ta.c
/optee_os/core/mm/mobj.c
/optee_os/core/pta/benchmark.c
/optee_os/core/pta/gprof.c
/optee_os/core/tee/tadb.c
/optee_os/core/tee/tee_ree_fs.c
/optee_os/core/tee/tee_rpmb_fs.c
/optee_os/core/tee/tee_supp_plugin_rpc.c
/optee_os/core/tee/tee_svc.c
/optee_os/core/tee/tee_svc_cryp.c
/optee_os/ldelf/pauth.c
/optee_os/ldelf/pauth.h
/optee_os/ldelf/sub.mk
libunw/include/unw/unwind.h
libunw/unwind_arm64.c
/optee_os/mk/config.mk
/optee_os/mk/subdir.mk
/optee_os/scripts/sign_encrypt.py
/optee_os/scripts/sign_helper_kms.py
ad7aa2a506-Jan-2022 Sadiq Hussain <sadiq.muchumarri@intel.com>

libutee: Panic when IV is provided for ECB modes

Ideally, the ECB mode doesn't need an IV at all.
The GlobalPlatform spec says "IV required: No" for
the algorithms that use this mode (Table 6-6b).

libutee: Panic when IV is provided for ECB modes

Ideally, the ECB mode doesn't need an IV at all.
The GlobalPlatform spec says "IV required: No" for
the algorithms that use this mode (Table 6-6b).

So, in order to be inclined to the requirement of the
spec, the implementation can panic when IV is provided
for ECB modes.

Signed-off-by: Sadiq Hussain <sadiq.muchumarri@intel.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


/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/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/spmc_sp_handler.c
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/mm/sp_mem.c
/optee_os/core/arch/arm/mm/sub.mk
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-sam/main.c
/optee_os/core/arch/arm/plat-sam/pm/psci.c
/optee_os/core/arch/arm/plat-sam/pm/sub.mk
/optee_os/core/arch/arm/plat-sam/sub.mk
/optee_os/core/drivers/crypto/caam/caam_rng.c
/optee_os/core/drivers/crypto/caam/hal/common/hal_cfg.c
/optee_os/core/drivers/crypto/caam/hal/common/hal_rng.c
/optee_os/core/drivers/crypto/caam/hal/imx_8q/hal_cfg.c
/optee_os/core/drivers/crypto/caam/hal/imx_8q/hal_clk.c
/optee_os/core/drivers/crypto/caam/hal/imx_8q/hal_ctrl.c
/optee_os/core/drivers/crypto/caam/hal/imx_8q/hal_jr.c
/optee_os/core/drivers/crypto/caam/hal/imx_8q/hal_rng.c
/optee_os/core/drivers/crypto/caam/hal/imx_8q/registers/ctrl_regs.h
/optee_os/core/drivers/crypto/caam/hal/imx_8q/sub.mk
/optee_os/core/drivers/crypto/caam/hal/sub.mk
/optee_os/core/drivers/crypto/caam/include/caam_hal_rng.h
/optee_os/core/drivers/crypto/caam/include/caam_status.h
/optee_os/core/include/mm/sp_mem.h
/optee_os/core/include/mm/vm.h
/optee_os/core/mm/vm.c
libutee/tee_api_operations.c
/optee_os/scripts/sign_encrypt.py
/optee_os/ta/pkcs11/src/object.c
a51d45b517-Dec-2021 Jens Wiklander <jens.wiklander@linaro.org>

libutils: mempool based raw malloc functions

Instead of the old stack like internal memory allocator, use the raw
malloc functions instead for more efficient memory usage.

CFG_WITH_STATS is enabled

libutils: mempool based raw malloc functions

Instead of the old stack like internal memory allocator, use the raw
malloc functions instead for more efficient memory usage.

CFG_WITH_STATS is enabled automatically if
CFG_MEMPOOL_REPORT_LAST_OFFSET is enabled to secure a new dependency in
the code.

Acked-by: Sahil Malhotra <sahil.malhotra@nxp.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

680bc37c17-Dec-2021 Jens Wiklander <jens.wiklander@linaro.org>

libutils: export raw malloc functions

Exports raw_{memalign,malloc,free,calloc,realloc}() and also adds
raw_malloc_get_ctx_size(), raw_malloc_init_ctx(),
raw_malloc_add_pool() and raw_malloc_get_sta

libutils: export raw malloc functions

Exports raw_{memalign,malloc,free,calloc,realloc}() and also adds
raw_malloc_get_ctx_size(), raw_malloc_init_ctx(),
raw_malloc_add_pool() and raw_malloc_get_stats().

This allows using the malloc functions to allocate with a independent
memory pool.

Acked-by: Sahil Malhotra <sahil.malhotra@nxp.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

b224894f21-Dec-2021 Sumit Garg <sumit.garg@linaro.org>

libutils: provide __sprintf_chk implementation

While building optee_test CXX test-cases natively on aarch64, OP-TEE
build relies on toolchain provided by buildroot. The buildroot toolchain
is built

libutils: provide __sprintf_chk implementation

While building optee_test CXX test-cases natively on aarch64, OP-TEE
build relies on toolchain provided by buildroot. The buildroot toolchain
is built with flag: -fstack-protector-strong which requires
__sprintf_chk symbol provided by standard glibc. For OP-TEE we use a
customized libc which leads to below error:

...
CC out/init.o
CC out/os_test.o
CC out/ta_entry.o
CXX out/cxx_tests.o
CC out/user_ta_header.o
CPP out/ta.lds
LD out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf
/home/sumit/optee_br/build/../toolchains/aarch64/bin/aarch64-linux-ld.bfd: /home/sumit/optee_br/toolchains/aarch64/bin/../lib/gcc/aarch64-buildroot-linux-gnu/10.3.0/../../../../aarch64-buildroot-linux-gnu/lib/../lib64/libstdc++.a(cp-demangle.o): in function d_append_num': cp-demangle.c:(.text+0x830): undefined reference to __sprintf_chk'
...

Fix this issue by providing __sprintf_chk implementation.

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

show more ...

30e743f613-Dec-2021 Ruchika Gupta <ruchika.gupta@linaro.org>

lib: libutils: Use ret for longjmp with Clang and BTI

longjmp uses br instead of ret to jump to the target. Thus the target
location should have the right BTI launchpad to handle this.
clang has a b

lib: libutils: Use ret for longjmp with Clang and BTI

longjmp uses br instead of ret to jump to the target. Thus the target
location should have the right BTI launchpad to handle this.
clang has a bug [1] and doesn't add the BTI after setjmp causing
exception when BTI is enabled. This works well with gcc [2]
and can be tested when compiling xtests with WITH_CXX_TESTS=n.
To avoid the exception, use ret instead of br with clang and BTI.

[1] - https://bugs.llvm.org/show_bug.cgi?id=49544
[2] - https://gcc.gnu.org/legacy-ml/gcc-patches/2018-11/msg02472.html

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>

show more ...

181f849206-Dec-2021 Ruchika Gupta <ruchika.gupta@linaro.org>

Generate ELF Note for BTI in all arm64 asm files

Add program property note section in the assembly files to
ensure that when linking them, program property note section
is generated in the final ELF

Generate ELF Note for BTI in all arm64 asm files

Add program property note section in the assembly files to
ensure that when linking them, program property note section
is generated in the final ELF.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

1...<<11121314151617181920>>...36