diff -u crash-7.0.3/debian/changelog crash-7.0.3/debian/changelog --- crash-7.0.3/debian/changelog +++ crash-7.0.3/debian/changelog @@ -1,3 +1,10 @@ +crash (7.0.3-3ubuntu4.5) trusty; urgency=medium + + * Fix for: Unable to analyse vmcore/dump via crash due to bad kernel + debug info build (LP: #1607894). + + -- Robert Hooker Thu, 01 Dec 2016 12:03:17 -0500 + crash (7.0.3-3ubuntu4.4) trusty; urgency=medium * Fix for crash: page excluded: kernel virtual address: ffff881052fa8000 diff -u crash-7.0.3/debian/patches/series crash-7.0.3/debian/patches/series --- crash-7.0.3/debian/patches/series +++ crash-7.0.3/debian/patches/series @@ -9,0 +10,2 @@ +Fix_for_the_changes_made_to_the_kernel_module-1.patch +Fix_for_the_changes_made_to_the_kernel_module-2.patch only in patch2: unchanged: --- crash-7.0.3.orig/debian/patches/Fix_for_the_changes_made_to_the_kernel_module-1.patch +++ crash-7.0.3/debian/patches/Fix_for_the_changes_made_to_the_kernel_module-1.patch @@ -0,0 +1,75 @@ +commit 6f1f78e33474d00d5f261d7ed9d835c558b34d61 +Author: Dave Anderson +Date: Wed Jan 20 09:56:36 2016 -0500 + + Fix for the changes made to the kernel module structure introduced by + this kernel commit for Linux 4.5 and later kernels: + + commit 7523e4dc5057e157212b4741abd6256e03404cf1 + module: use a structure to encapsulate layout. + + Without the patch, the crash session fails during initialization + with the error message: "crash: invalid structure member offset: + module_init_text_size". + (sebott@linux.vnet.ibm.com) + +diff --git a/kernel.c b/kernel.c +index 2d4188a..5ce2fb9 100644 +--- a/kernel.c ++++ b/kernel.c +@@ -3291,16 +3291,45 @@ module_init(void) + MEMBER_OFFSET_INIT(module_gpl_syms, "module", "gpl_syms"); + MEMBER_OFFSET_INIT(module_num_gpl_syms, "module", + "num_gpl_syms"); +- MEMBER_OFFSET_INIT(module_module_core, "module", +- "module_core"); +- MEMBER_OFFSET_INIT(module_core_size, "module", +- "core_size"); +- MEMBER_OFFSET_INIT(module_core_text_size, "module", +- "core_text_size"); +- MEMBER_OFFSET_INIT(module_module_init, "module", "module_init"); +- MEMBER_OFFSET_INIT(module_init_size, "module", "init_size"); +- MEMBER_OFFSET_INIT(module_init_text_size, "module", +- "init_text_size"); ++ ++ if (MEMBER_EXISTS("module", "module_core")) { ++ MEMBER_OFFSET_INIT(module_core_size, "module", ++ "core_size"); ++ MEMBER_OFFSET_INIT(module_init_size, "module", ++ "init_size"); ++ ++ MEMBER_OFFSET_INIT(module_core_text_size, "module", ++ "core_text_size"); ++ MEMBER_OFFSET_INIT(module_init_text_size, "module", ++ "init_text_size"); ++ ++ MEMBER_OFFSET_INIT(module_module_core, "module", ++ "module_core"); ++ MEMBER_OFFSET_INIT(module_module_init, "module", ++ "module_init"); ++ } else { ++ ASSIGN_OFFSET(module_core_size) = ++ MEMBER_OFFSET("module", "core_layout") + ++ MEMBER_OFFSET("module_layout", "size"); ++ ASSIGN_OFFSET(module_init_size) = ++ MEMBER_OFFSET("module", "init_layout") + ++ MEMBER_OFFSET("module_layout", "size"); ++ ++ ASSIGN_OFFSET(module_core_text_size) = ++ MEMBER_OFFSET("module", "core_layout") + ++ MEMBER_OFFSET("module_layout", "text_size"); ++ ASSIGN_OFFSET(module_init_text_size) = ++ MEMBER_OFFSET("module", "init_layout") + ++ MEMBER_OFFSET("module_layout", "text_size"); ++ ++ ASSIGN_OFFSET(module_module_core) = ++ MEMBER_OFFSET("module", "core_layout") + ++ MEMBER_OFFSET("module_layout", "base"); ++ ASSIGN_OFFSET(module_module_init) = ++ MEMBER_OFFSET("module", "init_layout") + ++ MEMBER_OFFSET("module_layout", "base"); ++ } ++ + MEMBER_OFFSET_INIT(module_percpu, "module", "percpu"); + + /* only in patch2: unchanged: --- crash-7.0.3.orig/debian/patches/Fix_for_the_changes_made_to_the_kernel_module-2.patch +++ crash-7.0.3/debian/patches/Fix_for_the_changes_made_to_the_kernel_module-2.patch @@ -0,0 +1,42 @@ +commit 098cdab16dfa6a85e9dad2cad604dee14ee15f66 +Author: Dave Anderson +Date: Fri Feb 12 14:32:53 2016 -0500 + + Fix for the changes made to the kernel module structure introduced by + this kernel commit for Linux 4.5 and later kernels: + + commit 8244062ef1e54502ef55f54cced659913f244c3e + modules: fix longstanding /proc/kallsyms vs module insertion race. + + Without the patch, the crash session fails during initialization + with the error message: "crash: invalid structure member offset: + module_num_symtab". + (anderson@redhat.com) + +diff --git a/kernel.c b/kernel.c +index e8969bb..5d8a965 100644 +--- a/kernel.c ++++ b/kernel.c +@@ -679,6 +679,22 @@ kernel_init() + kt->flags |= KALLSYMS_V2; + } + ++ if (INVALID_MEMBER(module_num_symtab) && ++ MEMBER_EXISTS("module", "core_kallsyms")) { ++ ASSIGN_OFFSET(module_num_symtab) = ++ MEMBER_OFFSET("module", "core_kallsyms") + ++ MEMBER_OFFSET("mod_kallsyms", "num_symtab"); ++ ASSIGN_OFFSET(module_symtab) = ++ MEMBER_OFFSET("module", "core_kallsyms") + ++ MEMBER_OFFSET("mod_kallsyms", "symtab"); ++ ASSIGN_OFFSET(module_strtab) = ++ MEMBER_OFFSET("module", "core_kallsyms") + ++ MEMBER_OFFSET("mod_kallsyms", "strtab"); ++ ++ if (!(kt->flags & NO_KALLSYMS)) ++ kt->flags |= KALLSYMS_V2; ++ } ++ + if (!(kt->flags & DWARF_UNWIND)) + kt->flags |= NO_DWARF_UNWIND; +