Include map entries that have an amap associated with them in the coredump.
authorkettenis <kettenis@openbsd.org>
Fri, 12 Aug 2016 22:46:02 +0000 (22:46 +0000)
committerkettenis <kettenis@openbsd.org>
Fri, 12 Aug 2016 22:46:02 +0000 (22:46 +0000)
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

index 3d6d3ad..53a90ae 100644 (file)
@@ -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;