Skip to content

Commit

Permalink
kdump: append uts_namespace.name offset to VMCOREINFO
Browse files Browse the repository at this point in the history
The offset of the field 'init_uts_ns.name' has changed since commit
9a56493 ("uts: Use generic ns_common::count").

Make the offset of the field 'uts_namespace.name' available in VMCOREINFO
because tools like 'crash-utility' and 'makedumpfile' must be able to read
it from crash dumps.

Link: https://lore.kernel.org/r/159644978167.604812.1773586504374412107.stgit@localhost.localdomain
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Alexander Egorenkov <[email protected]>
Acked-by: lijiang <[email protected]>
Acked-by: Baoquan He <[email protected]>
Cc: Dave Young <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: "Eric W . Biederman" <[email protected]>
Cc: Kirill Tkhai <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Christian Brauner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
eaibmz authored and torvalds committed Dec 16, 2020
1 parent e7920b3 commit ca4a924
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/admin-guide/kdump/vmcoreinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ call.
User-space tools can get the kernel name, host name, kernel release
number, kernel version, architecture name and OS type from it.

(uts_namespace, name)
---------------------

Offset of the name's member. Crash Utility and Makedumpfile get
the start address of the init_uts_ns.name from this.

node_online_map
---------------

Expand Down
1 change: 1 addition & 0 deletions kernel/crash_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ static int __init crash_save_vmcoreinfo_init(void)
VMCOREINFO_PAGESIZE(PAGE_SIZE);

VMCOREINFO_SYMBOL(init_uts_ns);
VMCOREINFO_OFFSET(uts_namespace, name);
VMCOREINFO_SYMBOL(node_online_map);
#ifdef CONFIG_MMU
VMCOREINFO_SYMBOL_ARRAY(swapper_pg_dir);
Expand Down

0 comments on commit ca4a924

Please sign in to comment.