[kernel/f17] Print out some extra debug information when we hit bad page tables.
Dave Jones
davej at fedoraproject.org
Thu Apr 11 15:55:49 UTC 2013
commit 257bb08298e48abcc6a33f81e8137e899d6c3d8f
Author: Dave Jones <davej at redhat.com>
Date: Thu Apr 11 11:53:05 2013 -0400
Print out some extra debug information when we hit bad page tables.
debug-bad-pte-dmi.patch | 64 +++++++++++++++++++++++++++++++++++++++++++
debug-bad-pte-modules.patch | 21 ++++++++++++++
kernel.spec | 10 +++++++
3 files changed, 95 insertions(+), 0 deletions(-)
---
diff --git a/debug-bad-pte-dmi.patch b/debug-bad-pte-dmi.patch
new file mode 100644
index 0000000..0552cb3
--- /dev/null
+++ b/debug-bad-pte-dmi.patch
@@ -0,0 +1,64 @@
+diff -durpN '--exclude-from=/home/davej/.exclude' /home/davej/src/kernel/git-trees/linux/include/asm-generic/bug.h linux-dj/include/asm-generic/bug.h
+--- /home/davej/src/kernel/git-trees/linux/include/asm-generic/bug.h 2013-01-04 18:57:12.604282214 -0500
++++ linux-dj/include/asm-generic/bug.h 2013-02-28 20:04:37.649304147 -0500
+@@ -55,6 +55,8 @@ struct bug_entry {
+ #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0)
+ #endif
+
++void print_hardware_dmi_name(void);
++
+ /*
+ * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
+ * significant issues that need prompt attention if they should ever
+diff -durpN '--exclude-from=/home/davej/.exclude' /home/davej/src/kernel/git-trees/linux/kernel/panic.c linux-dj/kernel/panic.c
+--- /home/davej/src/kernel/git-trees/linux/kernel/panic.c 2013-02-26 14:41:18.544116674 -0500
++++ linux-dj/kernel/panic.c 2013-02-28 20:04:37.666304115 -0500
+@@ -397,16 +397,22 @@ struct slowpath_args {
+ va_list args;
+ };
+
+-static void warn_slowpath_common(const char *file, int line, void *caller,
+- unsigned taint, struct slowpath_args *args)
++void print_hardware_dmi_name(void)
+ {
+ const char *board;
+
+- printk(KERN_WARNING "------------[ cut here ]------------\n");
+- printk(KERN_WARNING "WARNING: at %s:%d %pS()\n", file, line, caller);
+ board = dmi_get_system_info(DMI_PRODUCT_NAME);
+ if (board)
+ printk(KERN_WARNING "Hardware name: %s\n", board);
++}
++
++static void warn_slowpath_common(const char *file, int line, void *caller,
++ unsigned taint, struct slowpath_args *args)
++{
++ printk(KERN_WARNING "------------[ cut here ]------------\n");
++ printk(KERN_WARNING "WARNING: at %s:%d %pS()\n", file, line, caller);
++
++ print_hardware_dmi_name();
+
+ if (args)
+ vprintk(args->fmt, args->args);
+diff -durpN '--exclude-from=/home/davej/.exclude' /home/davej/src/kernel/git-trees/linux/mm/memory.c linux-dj/mm/memory.c
+--- /home/davej/src/kernel/git-trees/linux/mm/memory.c 2013-02-26 14:41:18.591116577 -0500
++++ linux-dj/mm/memory.c 2013-02-28 20:04:37.678304092 -0500
+@@ -705,6 +706,8 @@ static void print_bad_pte(struct vm_area
+ "BUG: Bad page map in process %s pte:%08llx pmd:%08llx\n",
+ current->comm,
+ (long long)pte_val(pte), (long long)pmd_val(*pmd));
++ print_hardware_dmi_name();
++
+ if (page)
+ dump_page(page);
+ printk(KERN_ALERT
+--- linux-dj/mm/page_alloc.c~ 2013-04-11 11:47:12.536675503 -0400
++++ linux-dj/mm/page_alloc.c 2013-04-11 11:47:16.416667806 -0400
+@@ -321,6 +321,7 @@ static void bad_page(struct page *page)
+ current->comm, page_to_pfn(page));
+ dump_page(page);
+
++ print_hardware_dmi_name();
+ print_modules();
+ dump_stack();
+ out:
diff --git a/debug-bad-pte-modules.patch b/debug-bad-pte-modules.patch
new file mode 100644
index 0000000..bcf3286
--- /dev/null
+++ b/debug-bad-pte-modules.patch
@@ -0,0 +1,21 @@
+diff -durpN '--exclude-from=/home/davej/.exclude' /home/davej/src/kernel/git-trees/linux/mm/memory.c linux-dj/mm/memory.c
+--- /home/davej/src/kernel/git-trees/linux/mm/memory.c 2013-02-26 14:41:18.591116577 -0500
++++ linux-dj/mm/memory.c 2013-02-28 20:04:37.678304092 -0500
+@@ -57,6 +57,7 @@
+ #include <linux/swapops.h>
+ #include <linux/elf.h>
+ #include <linux/gfp.h>
++#include <linux/module.h>
+ #include <linux/migrate.h>
+ #include <linux/string.h>
+
+--- linux-3.8.6-104.fc17.noarch/mm/memory.c~ 2013-04-11 11:48:54.024470277 -0400
++++ linux-3.8.6-104.fc17.noarch/mm/memory.c 2013-04-11 11:49:15.770425274 -0400
+@@ -718,6 +718,7 @@ static void print_bad_pte(struct vm_area
+ if (vma->vm_file && vma->vm_file->f_op)
+ print_symbol(KERN_ALERT "vma->vm_file->f_op->mmap: %s\n",
+ (unsigned long)vma->vm_file->f_op->mmap);
++ print_modules();
+ dump_stack();
+ add_taint(TAINT_BAD_PAGE);
+ }
diff --git a/kernel.spec b/kernel.spec
index 15d9cb2..add6787 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -628,6 +628,9 @@ Patch101: taint-rss.patch
Patch110: vmbugon-warnon.patch
+Patch200: debug-bad-pte-dmi.patch
+Patch201: debug-bad-pte-modules.patch
+
Patch390: defaults-acpi-video.patch
Patch391: acpi-video-dos.patch
Patch394: acpi-debug-infinite-loop.patch
@@ -1324,6 +1327,10 @@ ApplyPatch taint-rss.patch
ApplyPatch vmbugon-warnon.patch
+ApplyPatch debug-bad-pte-dmi.patch
+ApplyPatch debug-bad-pte-modules.patch
+
+
# Architecture patches
# x86(-64)
@@ -2373,6 +2380,9 @@ fi
# '-' | |
# '-'
%changelog
+* Thu Apr 11 2013 Dave Jones <davej at redhat.com>
+- Print out some extra debug information when we hit bad page tables.
+
* Thu Apr 11 2013 Josh Boyer <jwboyer at redhat.com>
- Fix ALPS backport patch (rhbz 812111)
More information about the scm-commits
mailing list