| #
5b6f4be8 |
| 28-May-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: compiler friendly 32-bit FTMN_FUNC_HASH() version
Add a more compiler friendly 32-bit implementation of FTMN_FUNC_HASH(). This gives the same output as the previous 64-bit based implementation
core: compiler friendly 32-bit FTMN_FUNC_HASH() version
Add a more compiler friendly 32-bit implementation of FTMN_FUNC_HASH(). This gives the same output as the previous 64-bit based implementation, but base the computation on 32-bit values.
This patch reduces stack usage when compiling with arm-linux-gnueabihf-gcc version 11.3.1 using -O0 optimization. For example, sw_crypto_acipher_rsassa_verify() is reduced from 3616 bytes to 284 bytes.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_virt)
show more ...
|
| #
78af2f12 |
| 09-Oct-2023 |
Alvin Chang <alvinga@andestech.com> |
libutils: fault_mitigation.h: Fix indentation
Indentation with tab instead of space.
Fixes: ce56605a0ede ("core: support fault mitigations in non-threaded code") Signed-off-by: Alvin Chang <alvinga
libutils: fault_mitigation.h: Fix indentation
Indentation with tab instead of space.
Fixes: ce56605a0ede ("core: support fault mitigations in non-threaded code") Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
ce56605a |
| 22-Sep-2023 |
Sichun Qin <sichun.qin@amlogic.com> |
core: support fault mitigations in non-threaded code
Fault mitigation won't work in non-threaded code due to the following error: assertion 'ct >= 0 && ct < CFG_NUM_THREADS' failed at core/arch/arm/
core: support fault mitigations in non-threaded code
Fault mitigation won't work in non-threaded code due to the following error: assertion 'ct >= 0 && ct < CFG_NUM_THREADS' failed at core/arch/arm/kernel /thread.c:799 <thread_get_id>
The problem is in __ftmn_get_tsd_func_arg_pp which calls thread_get_tsd which thread_get_id. The reason is that the interrupt handler is not associated with any thread, so the ct (current_thread_id) value is -1 which would cause an assert problem.
The fix is to add ftmn_arg to thread_core_local and the new variable would be used when the current thread is < 0.
Signed-off-by: Sichun Qin <sichun.qin@amlogic.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
7e75ca54 |
| 01-Apr-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
Basic fault mitigation routines
Adds basic fault mitigation routines designed to help protecting from fault injection attacks on the hardware. This is by no means bullet proof, but it should at leas
Basic fault mitigation routines
Adds basic fault mitigation routines designed to help protecting from fault injection attacks on the hardware. This is by no means bullet proof, but it should at least improve the situation.
These routines focus on verifying that a function has been called and that the returned value matches the result from the function. This is done by having a handshake between the caller and the callee where also the return value is transmitted in a separate channel.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|