X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..765c9de3b4af7c2078d16a03812ae2c7c2b24938:/bsd/kern/kern_core.c diff --git a/bsd/kern/kern_core.c b/bsd/kern/kern_core.c index 7776eb45d..144331f7d 100644 --- a/bsd/kern/kern_core.c +++ b/bsd/kern/kern_core.c @@ -51,6 +51,7 @@ #include #include +#include #include @@ -185,7 +186,8 @@ coredump(p) * into core file. */ #if defined (__ppc__) - fpu_save(); + fpu_save(current_act()); + vec_save(current_act()); #endif sprintf(core_name, "/cores/core.%d", p->p_pid); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, core_name, p); @@ -316,7 +318,7 @@ coredump(p) * Note: if we can't read, then we end up with * a hole in the file. */ - if ((maxprot & VM_PROT_READ) == VM_PROT_READ) { + if ((maxprot & VM_PROT_READ) == VM_PROT_READ && vbr.user_tag != VM_MEMORY_IOKIT) { error = vn_rdwr(UIO_WRITE, vp, (caddr_t)vmoffset, size, foffset, UIO_USERSPACE, IO_NODELOCKED|IO_UNIT, cred, (int *) 0, p); }