[PATCH] RISC-V: fix stack clobbering in relocate_to_adr
Sascha Hauer
s.hauer at pengutronix.de
Mon Sep 15 23:34:51 PDT 2025
On Fri, 12 Sep 2025 10:34:38 +0200, Ahmad Fatoum wrote:
> relocate_to_adr is decrementing two SZREG worth of stack space to be able
> to spill two registers. An off-by-one led us to reference the word after
> the reserved stack space, clobbering one word from the previous
> function's stack frame unintentionally.
>
> This this by decrementing the offsets by 1.
>
> [...]
Applied, thanks!
[1/1] RISC-V: fix stack clobbering in relocate_to_adr
https://git.pengutronix.de/cgit/barebox/commit/?id=f3be3a8e9ae8 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list