The patch titled Subject: kexec, vmalloc: export additional vmalloc layer information has been added to the -mm tree. Its filename is kexec-vmalloc-export-additional-vmalloc-layer-information.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Atsushi Kumagai <kumagai-atsushi@xxxxxxxxxxxxxxxxx> Subject: kexec, vmalloc: export additional vmalloc layer information Now, vmap_area_list is exported as VMCOREINFO for makedumpfile to get the start address of vmalloc region (vmalloc_start). The address which contains vmalloc_start value is represented as below: vmap_area_list.next - OFFSET(vmap_area.list) + OFFSET(vmap_area.va_start) However, both OFFSET(vmap_area.va_start) and OFFSET(vmap_area.list) aren't exported as VMCOREINFO. So this patch exports them externally with small cleanup. Signed-off-by: Atsushi Kumagai <kumagai-atsushi@xxxxxxxxxxxxxxxxx> Cc: Joonsoo Kim <js1304@xxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Atsushi Kumagai <kumagai-atsushi@xxxxxxxxxxxxxxxxx> Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx> Cc: Dave Anderson <anderson@xxxxxxxxxx> Cc: Eric Biederman <ebiederm@xxxxxxxxxxxx> Cc: Guan Xuetao <gxt@xxxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/vmalloc.h | 12 ++++++++++++ kernel/kexec.c | 3 ++- mm/vmalloc.c | 11 ----------- 3 files changed, 14 insertions(+), 12 deletions(-) diff -puN include/linux/vmalloc.h~kexec-vmalloc-export-additional-vmalloc-layer-information include/linux/vmalloc.h --- a/include/linux/vmalloc.h~kexec-vmalloc-export-additional-vmalloc-layer-information +++ a/include/linux/vmalloc.h @@ -4,6 +4,7 @@ #include <linux/spinlock.h> #include <linux/init.h> #include <asm/page.h> /* pgprot_t */ +#include <linux/rbtree.h> struct vm_area_struct; /* vma defining user mapping in mm_types.h */ @@ -35,6 +36,17 @@ struct vm_struct { const void *caller; }; +struct vmap_area { + unsigned long va_start; + unsigned long va_end; + unsigned long flags; + struct rb_node rb_node; /* address sorted rbtree */ + struct list_head list; /* address sorted list */ + struct list_head purge_list; /* "lazy purge" list */ + struct vm_struct *vm; + struct rcu_head rcu_head; +}; + /* * Highlevel APIs for driver use */ diff -puN kernel/kexec.c~kexec-vmalloc-export-additional-vmalloc-layer-information kernel/kexec.c --- a/kernel/kexec.c~kexec-vmalloc-export-additional-vmalloc-layer-information +++ a/kernel/kexec.c @@ -1523,7 +1523,8 @@ static int __init crash_save_vmcoreinfo_ VMCOREINFO_OFFSET(free_area, free_list); VMCOREINFO_OFFSET(list_head, next); VMCOREINFO_OFFSET(list_head, prev); - VMCOREINFO_OFFSET(vm_struct, addr); + VMCOREINFO_OFFSET(vmap_area, va_start); + VMCOREINFO_OFFSET(vmap_area, list); VMCOREINFO_LENGTH(zone.free_area, MAX_ORDER); log_buf_kexec_setup(); VMCOREINFO_LENGTH(free_area.free_list, MIGRATE_TYPES); diff -puN mm/vmalloc.c~kexec-vmalloc-export-additional-vmalloc-layer-information mm/vmalloc.c --- a/mm/vmalloc.c~kexec-vmalloc-export-additional-vmalloc-layer-information +++ a/mm/vmalloc.c @@ -249,17 +249,6 @@ EXPORT_SYMBOL(vmalloc_to_pfn); #define VM_LAZY_FREEING 0x02 #define VM_VM_AREA 0x04 -struct vmap_area { - unsigned long va_start; - unsigned long va_end; - unsigned long flags; - struct rb_node rb_node; /* address sorted rbtree */ - struct list_head list; /* address sorted list */ - struct list_head purge_list; /* "lazy purge" list */ - struct vm_struct *vm; - struct rcu_head rcu_head; -}; - static DEFINE_SPINLOCK(vmap_area_lock); /* Export for kexec only */ LIST_HEAD(vmap_area_list); _ Patches currently in -mm which might be from kumagai-atsushi@xxxxxxxxxxxxxxxxx are mm-vmalloc-change-iterating-a-vmlist-to-find_vm_area.patch mm-vmalloc-move-get_vmalloc_info-to-vmallocc.patch mm-vmalloc-protect-va-vm-by-vmap_area_lock.patch mm-vmalloc-iterate-vmap_area_list-instead-of-vmlist-in-vread-vwrite.patch mm-vmalloc-iterate-vmap_area_list-in-get_vmalloc_info.patch mm-vmalloc-iterate-vmap_area_list-instead-of-vmlist-in-vmallocinfo.patch mm-vmalloc-export-vmap_area_list-instead-of-vmlist.patch mm-vmalloc-remove-list-management-of-vmlist-after-initializing-vmalloc.patch kexec-vmalloc-export-additional-vmalloc-layer-information.patch kexec-vmalloc-export-additional-vmalloc-layer-information-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html