History log of /optee_os/lib/libutils/ext/include/confine_array_index.h (Results 1 – 6 of 6)
Revision Date Author Comments
# f197f055 30-Nov-2022 liushiwei <liushiwei@eswincomputing.com>

libutils: confine_array_index: add support for RISC-V

Add a naive C implementation for RISC-V.

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: liushiwei <liushiwei@eswincomputin

libutils: confine_array_index: add support for RISC-V

Add a naive C implementation for RISC-V.

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: liushiwei <liushiwei@eswincomputing.com>
Reviewed-by: chenchaokai <chenchaokai@eswincomputing.com>

show more ...


# bef33113 18-May-2020 Jerome Forissier <jerome@forissier.org>

libutils: confine_array_index: arm64: replace csdb by hint #20

Older compilers such as GCC 6.2 do not support the csdb mnemonic [1].
For better compatibility, replace it by its equivalent: hint #20.

libutils: confine_array_index: arm64: replace csdb by hint #20

Older compilers such as GCC 6.2 do not support the csdb mnemonic [1].
For better compatibility, replace it by its equivalent: hint #20.

CC out/arm/ldelf/ta_elf_rel.o
{standard input}: Assembler messages:
{standard input}:274: Error: unknown mnemonic `csdb' -- `csdb'
{standard input}:371: Error: unknown mnemonic `csdb' -- `csdb'
{standard input}:667: Error: unknown mnemonic `csdb' -- `csdb'
{standard input}:776: Error: unknown mnemonic `csdb' -- `csdb'
{standard input}:1010: Error: unknown mnemonic `csdb' -- `csdb'
{standard input}:1084: Error: unknown mnemonic `csdb' -- `csdb'
{standard input}:1413: Error: unknown mnemonic `csdb' -- `csdb'
{standard input}:1495: Error: unknown mnemonic `csdb' -- `csdb'
{standard input}:1671: Error: unknown mnemonic `csdb' -- `csdb'
make[1]: *** [mk/compile.mk:157: out/arm/ldelf/ta_elf_rel.o] Error 1

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


# 7540cb75 27-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

libutils: confine_array_index: fix clang build trace for Thumb2

Avoid trace 'deprecated instruction in IT block [-Werror,-Winline-asm]'
when building with CLang. The message states performance issue

libutils: confine_array_index: fix clang build trace for Thumb2

Avoid trace 'deprecated instruction in IT block [-Werror,-Winline-asm]'
when building with CLang. The message states performance issue which
is true but prefer the performance cost over the security flaw hence
warning trace is removed without embedded code changed.

Fixes: 2b6dd0df52b4 ("confine_array_index.h: add A32 and T32 versions of confine_array_index()")
Suggested-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# c7c07720 25-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

libutils: confine_array_index: fix 32bit modes implementation

Fix implementation of confine_array_index() for 32bit Arm and Thumb2
modes as previous implementation did not set the return value
expli

libutils: confine_array_index: fix 32bit modes implementation

Fix implementation of confine_array_index() for 32bit Arm and Thumb2
modes as previous implementation did not set the return value
explicitly and relied on luck with the layout of the machine code
to return the correct value.

Fixes: https://github.com/OP-TEE/optee_os/issues/3799
Fixes: 2b6dd0df52b4 ("confine_array_index.h: add A32 and T32 versions of confine_array_index()")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (qemu,qemu_v8)
Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 2b6dd0df 03-Mar-2020 Jens Wiklander <jens.wiklander@linaro.org>

confine_array_index.h: add A32 and T32 versions of confine_array_index()

Adds inline assembly implementations for the A32 and T32 instruction
sets. The implementation is based on __load_no_speculate

confine_array_index.h: add A32 and T32 versions of confine_array_index()

Adds inline assembly implementations for the A32 and T32 instruction
sets. The implementation is based on __load_no_speculate1() in
<speculation_barrier.h>.

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

show more ...


# 6b40e452 03-Mar-2020 Jens Wiklander <jens.wiklander@linaro.org>

libutils: import confine_array_index.h from Fuchsia

Imports confine_array_index.h from [1].

Replaced include statements to suit OP-TEE and removed the namespace
directive. Added content from [2] as

libutils: import confine_array_index.h from Fuchsia

Imports confine_array_index.h from [1].

Replaced include statements to suit OP-TEE and removed the namespace
directive. Added content from [2] as a comment to clarify the license.

The speculation safe function confine_array_index() is provided with
this.

Note that only AArch64 and x86_64 versions of the function is implemented
in this commit.

Link: [1] https://fuchsia.googlesource.com/fuchsia/+/39d9b8c2dbb0f6133a835676f8f669b07aca6b30/zircon/system/ulib/fbl/include/fbl/confine_array_index.h
Link: [2] https://fuchsia.googlesource.com/fuchsia/+/39d9b8c2dbb0f6133a835676f8f669b07aca6b30/LICENSE

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

show more ...