From: kettenis Date: Fri, 12 Aug 2016 22:46:02 +0000 (+0000) Subject: Include map entries that have an amap associated with them in the coredump. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=81305dc40c07419d7e8f5b439c22e6f1fa1b1445;p=openbsd Include map entries that have an amap associated with them in the coredump. This fixes coredumps of processes that use relro to make part of their writable address space read-only. ok guenther@ --- diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c index 3d6d3ad3f51..53a90ae1843 100644 --- a/sys/uvm/uvm_unix.c +++ b/sys/uvm/uvm_unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_unix.c,v 1.58 2016/04/04 16:34:16 stefan Exp $ */ +/* $OpenBSD: uvm_unix.c,v 1.59 2016/08/12 22:46:02 kettenis Exp $ */ /* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */ /* @@ -161,6 +161,7 @@ uvm_coredump_walkmap(struct proc *p, void *iocookie, } if (!(entry->protection & PROT_WRITE) && + entry->aref.ar_amap == NULL && entry->start != p->p_p->ps_sigcode) continue;