| #
7749dda2 |
| 08-Jun-2025 |
Aleksandr Iashchenko <aleksandr.iashchenko@linutronix.de> |
core, libutils: unpoison stack on longjmp for ASan
Adds support for unpoisoning the stack when performing longjmp, to ensure correct ASan behavior.
When a longjmp unwinds the stack, parts of the st
core, libutils: unpoison stack on longjmp for ASan
Adds support for unpoisoning the stack when performing longjmp, to ensure correct ASan behavior.
When a longjmp unwinds the stack, parts of the stack that were poisoned during deeper calls may remain marked as inaccessible. This can lead to false ASan reports after longjmp, as the new frame reuses that memory.
To avoid this, a call to asan_handle_longjmp() is added to setjmp_a64.S, which unpoisons the stack range between the current SP and the old SP (saved during setjmp).
Signed-off-by: Aleksandr Iashchenko <aleksandr.iashchenko@linutronix.de> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
bc12b0e9 |
| 20-Jun-2023 |
Alvin Chang <alvinga@andestech.com> |
libutils: riscv: Update setjmp() and longjmp() for ftrace support
Fix the registers saving/restoring conventions. The length of jump buffer is increased with one more slot to restore ftrace return s
libutils: riscv: Update setjmp() and longjmp() for ftrace support
Fix the registers saving/restoring conventions. The length of jump buffer is increased with one more slot to restore ftrace return stack.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|