arm unwind: Reject unaligned stack pointers
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D41533
This commit is contained in:
parent
6f3947be2a
commit
247e8662d2
@ -398,6 +398,9 @@ unwind_exec_insn(struct unwind_state *state)
|
||||
if (mask == 0)
|
||||
return 1;
|
||||
|
||||
if (!__is_aligned(vsp, sizeof(register_t)))
|
||||
return 1;
|
||||
|
||||
/* Update SP */
|
||||
update_vsp = 1;
|
||||
|
||||
@ -430,6 +433,9 @@ unwind_exec_insn(struct unwind_state *state)
|
||||
/* Read how many registers to load */
|
||||
count = insn & INSN_POP_COUNT_MASK;
|
||||
|
||||
if (!__is_aligned(vsp, sizeof(register_t)))
|
||||
return 1;
|
||||
|
||||
/* Update sp */
|
||||
update_vsp = 1;
|
||||
|
||||
@ -460,6 +466,9 @@ unwind_exec_insn(struct unwind_state *state)
|
||||
if (mask == 0 || (mask & 0xf0) != 0)
|
||||
return 1;
|
||||
|
||||
if (!__is_aligned(vsp, sizeof(register_t)))
|
||||
return 1;
|
||||
|
||||
/* Update SP */
|
||||
update_vsp = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user