diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-03-29 21:17:18 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-03-29 21:17:18 +0000 |
commit | e5060fd80d14aaadf2b8ab25f5c647458161eea7 (patch) | |
tree | 650a7e8f196e4a1103fca20d814cc4c3dce21139 | |
parent | c966af02044b124fc881a725622ccf584b1d0908 (diff) |
Do not include mmap'ed device memory in coredumps; from Matthias Drochner
<drochner@zel024.zel.kfa-juelich.de> in NetBSD PR 3252
-rw-r--r-- | sys/vm/vm_unix.c | 11 |
1 files changed, 10 insertions, 1 deletions
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; |