summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-05-16 19:25:56 +0000
committeralc <alc@FreeBSD.org>2010-05-16 19:25:56 +0000
commit862dd3e32604da80d67e56a2e31e84c205bf88d3 (patch)
treeaeb64fa048d6cb3401ece729923f114402724006 /sys
parent14881a2b1c1a24b61a02dfbb7858d12a3714afbf (diff)
downloadFreeBSD-src-862dd3e32604da80d67e56a2e31e84c205bf88d3.zip
FreeBSD-src-862dd3e32604da80d67e56a2e31e84c205bf88d3.tar.gz
Correct an error of omission in r202897: Now that amd64 uses the direct map
to access the message buffer, we must explicitly request that the underlying physical pages are included in a crash dump. Reported by: Benjamin Kaduk
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_page.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 69d3ac2..e70ca3f 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/limits.h>
#include <sys/malloc.h>
+#include <sys/msgbuf.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
@@ -375,6 +376,19 @@ vm_page_startup(vm_offset_t vaddr)
new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE);
bzero((void *)vm_page_dump, vm_page_dump_size);
#endif
+#ifdef __amd64__
+ /*
+ * Request that the physical pages underlying the message buffer be
+ * included in a crash dump. Since the message buffer is accessed
+ * through the direct map, they are not automatically included.
+ */
+ pa = DMAP_TO_PHYS((vm_offset_t)msgbufp->msg_ptr);
+ last_pa = pa + round_page(MSGBUF_SIZE);
+ while (pa < last_pa) {
+ dump_add_page(pa);
+ pa += PAGE_SIZE;
+ }
+#endif
/*
* Compute the number of pages of memory that will be available for
* use (taking into account the overhead of a page structure per
OpenPOWER on IntegriCloud