MFC 256941: make sure the frame is indeed in the kernel memory.

This commit is contained in:
ian 2014-05-18 16:02:56 +00:00
parent 4670db3f86
commit de651b30e7

View File

@ -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;