On Tue, 31 Jan 2017, Sebastien Marie wrote:
> On Tue, Jan 31, 2017 at 12:07:48AM -0800, Philip Guenther wrote:
> > Sun, 29 Jan 2017, Philip Guenther wrote:
> > ...
> >
> > semarie@, you can consistently trigger that kernel log message, perhaps
> > you can try reproducing it with this patch and see if it goes away?
>
> it is a bit better now: I have only one error message instead of two.
After some investigation with Sebastien off-list, we identified that the
other failure is from mappings that are not readable. That's a fix that's
easily separable.
oks?
Philip
Index: uvm_unix.c
===================================================================
RCS file: /data/src/openbsd/src/sys/uvm/uvm_unix.c,v
retrieving revision 1.60
diff -u -p -r1.60 uvm_unix.c
--- uvm_unix.c 16 Sep 2016 01:09:53 -0000 1.60
+++ uvm_unix.c 31 Jan 2017 16:59:35 -0000
@@ -165,6 +165,16 @@ uvm_coredump_walkmap(struct proc *p, voi
entry->start != p->p_p->ps_sigcode)
continue;
+ /*
+ * Skip pages marked as unreadable, as uiomove(UIO_USERSPACE)
+ * will fail on them. Maybe this really should be a test of
+ * entry->max_protection, but doing
+ * uvm_map_extract(UVM_EXTRACT_FIXPROT)
+ * when dumping such a mapping would suck.
+ */
+ if ((entry->protection & PROT_READ) == 0)
+ continue;
+
/* Don't dump mmaped devices. */
if (entry->object.uvm_obj != NULL &&
UVM_OBJ_IS_DEVICE(entry->object.uvm_obj))