From: tholo Date: Sat, 29 Mar 1997 21:17:17 +0000 (+0000) Subject: Do not include mmap'ed device memory in coredumps; from Matthias Drochner X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=833fe58c1124ba10f3066f0cbda6d3f8736e8780;p=openbsd Do not include mmap'ed device memory in coredumps; from Matthias Drochner in NetBSD PR 3252 --- diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c index 8175bf4077b..d56b60d33e2 100644 --- a/sys/vm/vm_unix.c +++ b/sys/vm/vm_unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_unix.c,v 1.2 1996/03/03 17:45:39 niklas Exp $ */ +/* $OpenBSD: vm_unix.c,v 1.3 1997/03/29 21:17:17 tholo Exp $ */ /* $NetBSD: vm_unix.c,v 1.19 1996/02/10 00:08:14 christos Exp $ */ /* @@ -188,6 +188,15 @@ vm_coredump(p, vp, cred, chdr) continue; } + if (entry->object.vm_object && + entry->object.vm_object->pager && + entry->object.vm_object->pager->pg_type == PG_DEVICE) { +#ifdef DEBUG + printf("vm_coredump: skipping dev @ %lx\n", (unsigned long)entry->start); +#endif + continue; + } + if (!(entry->protection & VM_PROT_WRITE)) continue;