1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-29 16:44:03 +00:00

Try to make sure the frame is indeed in the kernel memory.

This commit is contained in:
Olivier Houchard 2013-10-22 21:47:34 +00:00
parent 2481ce2f25
commit 97e7a34397
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256941

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;