From 81305dc40c07419d7e8f5b439c22e6f1fa1b1445 Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 12 Aug 2016 22:46:02 +0000 Subject: [PATCH] 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@ --- sys/uvm/uvm_unix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1