Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm uvm_coredump_walkmap(): Set UVM_COREDUMP_NODUMP on r...
details: https://anonhg.NetBSD.org/src/rev/50dd28c56ac3
branches: trunk
changeset: 580729:50dd28c56ac3
user: nathanw <nathanw%NetBSD.org@localhost>
date: Fri May 06 19:34:47 2005 +0000
description:
uvm_coredump_walkmap(): Set UVM_COREDUMP_NODUMP on regions whose
protection does not include VM_PROT_READ, so that the core dumping
doesn't error out with EFAULT when trying to write that region.
Addresses PR kern/30143; approach suggested by chs@.
diffstat:
sys/uvm/uvm_glue.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r c50582599bc5 -r 50dd28c56ac3 sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Fri May 06 19:32:30 2005 +0000
+++ b/sys/uvm/uvm_glue.c Fri May 06 19:34:47 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.84 2005/04/01 11:59:38 yamt Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.85 2005/05/06 19:34:47 nathanw Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.84 2005/04/01 11:59:38 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.85 2005/05/06 19:34:47 nathanw Exp $");
#include "opt_kgdb.h"
#include "opt_kstack.h"
@@ -746,6 +746,8 @@
* (eg. an executable text section).
*
* (3) the region's object is a device.
+ *
+ * (4) the region is unreadable by the process.
*/
KASSERT(!UVM_ET_ISSUBMAP(entry));
@@ -763,6 +765,9 @@
UVM_OBJ_IS_DEVICE(entry->object.uvm_obj)) {
state.flags |= UVM_COREDUMP_NODUMP;
}
+ if ((entry->protection & VM_PROT_READ) == 0) {
+ state.flags |= UVM_COREDUMP_NODUMP;
+ }
if (state.start >= (vaddr_t)vm->vm_maxsaddr) {
state.flags |= UVM_COREDUMP_STACK;
}
Home |
Main Index |
Thread Index |
Old Index