[PATCH] x86: fix initjmp storing base pointer at wrong address
Sascha Hauer
s.hauer at pengutronix.de
Mon Apr 13 07:35:48 PDT 2026
On Mon, 23 Mar 2026 08:17:28 +0100, Ahmad Fatoum wrote:
> initjmp was writing zero to 8(%edx), which is func + 8 (corrupting
> memory at the function pointer address), instead of 8(%eax), which is
> the __ebp (base pointer) slot in the jmp_buf. When longjmp later
> restored the buffer, it would load uninitialized data into %ebp.
>
> With regparm(3), the arguments are passed as:
> %eax = jmp_buf, %edx = func, %ecx = stack_top
>
> [...]
Applied, thanks!
[1/1] x86: fix initjmp storing base pointer at wrong address
https://git.pengutronix.de/cgit/barebox/commit/?id=29f6d89ef50b (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list