mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
arm64 db_trace: Ensure trapframe pointer is suitably aligned.
Reviewed by: jrtc27, markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41486
This commit is contained in:
parent
18974bd616
commit
638c68897f
|
@ -93,7 +93,8 @@ db_stack_trace_cmd(struct thread *td, struct unwind_state *frame)
|
|||
struct trapframe *tf;
|
||||
|
||||
tf = (struct trapframe *)(uintptr_t)frame->fp - 1;
|
||||
if (!kstack_contains(td, (vm_offset_t)tf,
|
||||
if (!__is_aligned(tf, _Alignof(*tf)) ||
|
||||
!kstack_contains(td, (vm_offset_t)tf,
|
||||
sizeof(*tf))) {
|
||||
db_printf("--- invalid trapframe %p\n", tf);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue