mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: libpayload: x86/exec - fix return value passing
The pointer to write the return value to is in %ecx, not %eax. Writing
to (%eax) leads to memory corruptions as %eax holds the return value,
e.g. would write zero to address zero for a "successful" returning
payload.
BUG=none
BRANCH=none
TEST=none
Change-Id: I92d9ceec19d236e756c4eaf2ecf9c0534a3ad482
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 901efea8ab
Original-Change-Id: I82df27ae89a9e3d25f479ebdda2b50ea57565459
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18332
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/443927
This commit is contained in:
parent
cd09feca23
commit
6b19c3fe38
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ i386_do_exec:
|
|||
*/
|
||||
|
||||
movl 20(%ebp), %ecx
|
||||
movl %eax, (%eax)
|
||||
movl %eax, (%ecx)
|
||||
|
||||
/* Get the rest of the saved registers */
|
||||
popl %ecx
|
||||
|
|
Loading…
Add table
Reference in a new issue