MFC 256941: make sure the frame is indeed in the kernel memory.
This commit is contained in:
parent
4670db3f86
commit
de651b30e7
@ -43,13 +43,16 @@ __FBSDID("$FreeBSD$");
|
||||
* APCS where it lays out the stack incorrectly. Because of this we disable
|
||||
* this when building for ARM EABI or when building with clang.
|
||||
*/
|
||||
|
||||
extern vm_offset_t kernel_vm_end;
|
||||
|
||||
static void
|
||||
stack_capture(struct stack *st, u_int32_t *frame)
|
||||
{
|
||||
#if !defined(__ARM_EABI__) && !defined(__clang__)
|
||||
vm_offset_t callpc;
|
||||
|
||||
while (INKERNEL(frame)) {
|
||||
while (INKERNEL(frame) && (vm_offset_t)frame < kernel_vm_end) {
|
||||
callpc = frame[FR_SCP];
|
||||
if (stack_put(st, callpc) == -1)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user