Skip to content

Commit

Permalink
aarch64: fix setjmp overrun
Browse files Browse the repository at this point in the history
The assembly code uses fixed offsets into the jmp_buf and leaves an 8 byte
gap between the GPRs and the FPRs, but the jmp_buf structure was not laid
out to account for this so the code would overrun the jmp_buf by 8 bytes.

Found-by: Oskar Engen <oskar.engen@gmail.com>
Signed-off-by: Dwight Engen <dwight.engen@gmail.com>
  • Loading branch information
dwengen authored and ncroxon committed Sep 28, 2022
1 parent 8b018e6 commit 4a566dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inc/aarch64/efisetjmp_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ typedef struct {
UINT64 FP;
UINT64 LR;
UINT64 IP0;
UINT64 _pad1;

/* FP regs */
UINT64 D8;
Expand Down

0 comments on commit 4a566dd

Please sign in to comment.