kexec: add dmesg log symbols to /proc/vmcoreinfo lists

It would be nice to be able to extract the dmesg log from a vmcore file
without needing to keep the debug symbols for the running kernel handy all
the time.  We have a facility to do this in /proc/vmcore.  This patch adds
the log_buf and log_end symbols to the vmcoreinfo area so that tools (like
makedumpfile) can easily extract the dmesg logs from a vmcore image.

[[email protected]: several fixes and cleanups]
[[email protected]: fix unused log_buf_kexec_setup()]
[[email protected]: build fix]
Signed-off-by: Neil Horman <[email protected]>
Cc: Simon Horman <[email protected]>
Acked-by: Vivek Goyal <[email protected]>
Cc: Neil Horman <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Neil Horman 2009-04-02 16:58:57 -07:00 • committed by Linus Torvalds
commit 04d491ab2a
3 changed files with 24 additions and 0 deletions

View file

@ -1409,6 +1409,7 @@ static int __init crash_save_vmcoreinfo_init(void)
VMCOREINFO_OFFSET(list_head, prev);
VMCOREINFO_OFFSET(vm_struct, addr);
VMCOREINFO_LENGTH(zone.free_area, MAX_ORDER);
log_buf_kexec_setup();
VMCOREINFO_LENGTH(free_area.free_list, MIGRATE_TYPES);
VMCOREINFO_NUMBER(NR_FREE_PAGES);
VMCOREINFO_NUMBER(PG_lru);