Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/uvm Pull up revision 1.85 (requested by nathanw in ti...
details: https://anonhg.NetBSD.org/src/rev/40610d5d585a
branches: netbsd-3
changeset: 575860:40610d5d585a
user: snj <snj%NetBSD.org@localhost>
date: Sun May 22 19:39:28 2005 +0000
description:
Pull up revision 1.85 (requested by nathanw in ticket #322):
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 05a034406ba9 -r 40610d5d585a sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Sun May 22 19:33:34 2005 +0000
+++ b/sys/uvm/uvm_glue.c Sun May 22 19:39:28 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.83 2005/02/08 08:22:37 yamt Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.83.4.1 2005/05/22 19:39:28 snj 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.83 2005/02/08 08:22:37 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.83.4.1 2005/05/22 19:39:28 snj Exp $");
#include "opt_kgdb.h"
#include "opt_kstack.h"
@@ -745,6 +745,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));
@@ -762,6 +764,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