Skip to contentSkip to conversation

kdump: append uts_namespace.name offset to VMCOREINFO

PATCH In review Alexander Egorenkov 5 participants 11 messages Sep 30, 2020 – Jan 11, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 kdump: append uts_namespace.name offset to VMCOREINFO

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("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.

---

v2 -> v3:
* Added documentation to vmcoreinfo.rst
* Use the short form of the commit reference

v1 -> v2:
* Improved commit message
* Added link to the discussion of the uts namespace changes

 Documentation/admin-guide/kdump/vmcoreinfo.rst | 6 ++++++
 kernel/crash_core.c                            | 1 +
 2 files changed, 7 insertions(+)
Documentation/admin-guide/kdump/vmcoreinfo.rst +6 -0
index e44a6c01f336..3861a25faae1 100644
@@ -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
 ---------------
 
kernel/crash_core.c +1 -0
index 106e4500fd53..173fdc261882 100644
@@ -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);
Signature · 7 lines
2.26.2


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

Hi, Alexander

Quoted 29 lines · Alexander Egorenkov

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("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.

---

v2 -> v3:
* Added documentation to vmcoreinfo.rst
* Use the short form of the commit reference

v1 -> v2:
* Improved commit message
* Added link to the discussion of the uts namespace changes

 Documentation/admin-guide/kdump/vmcoreinfo.rst | 6 ++++++
 kernel/crash_core.c                            | 1 +
 2 files changed, 7 insertions(+)
Documentation/admin-guide/kdump/vmcoreinfo.rst +0 -0
index e44a6c01f336..3861a25faae1 100644

Documentation/admin-guide/kdump/vmcoreinfo.rst call. · line 47

Quoted 9 lines
Documentation/admin-guide/kdump/vmcoreinfo.rst +6 -0
@@ -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.
+

Thank you for the update. The v3 looks good to me.

Quoted 16 lines
Documentation/admin-guide/kdump/vmcoreinfo.rst +0 -0
 node_online_map
 ---------------
 
kernel/crash_core.c +1 -0
index 106e4500fd53..173fdc261882 100644
@@ -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);
Acked-by on v3 1/1
#2 lore raw
In reply to Alexander Egorenkov
Quoted 10 lines · Alexander Egorenkov

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("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.

Ack, thanks.

Quoted 46 lines

---

v2 -> v3:
* Added documentation to vmcoreinfo.rst
* Use the short form of the commit reference

v1 -> v2:
* Improved commit message
* Added link to the discussion of the uts namespace changes

 Documentation/admin-guide/kdump/vmcoreinfo.rst | 6 ++++++
 kernel/crash_core.c                            | 1 +
 2 files changed, 7 insertions(+)
Documentation/admin-guide/kdump/vmcoreinfo.rst +6 -0
index e44a6c01f336..3861a25faae1 100644
@@ -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
 ---------------
 
kernel/crash_core.c +1 -0
index 106e4500fd53..173fdc261882 100644
@@ -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);
Signature · 1 line
2.26.2
#3 lore raw
In reply to Alexander Egorenkov
Quoted 2 lines · Alexander Egorenkov

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count").

This patch is merged into 5.11-rc1, but we met the makedumpfile failure of kdump test case in 5.10.0 kernel. Should affect 5.9 too since commit 9a56493f6942 is merged into 5.9-rc2.

Below tag and CC should have been added into patch when posted.

Fixes commit 9a56493f6942 ("uts: Use generic ns_common::count")

Hi Greg,

Do we still have chance to make it added into stable?

Thanks
Baoquan

Quoted 54 lines

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.

---

v2 -> v3:
* Added documentation to vmcoreinfo.rst
* Use the short form of the commit reference

v1 -> v2:
* Improved commit message
* Added link to the discussion of the uts namespace changes

 Documentation/admin-guide/kdump/vmcoreinfo.rst | 6 ++++++
 kernel/crash_core.c                            | 1 +
 2 files changed, 7 insertions(+)
Documentation/admin-guide/kdump/vmcoreinfo.rst +6 -0
index e44a6c01f336..3861a25faae1 100644
@@ -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
 ---------------
 
kernel/crash_core.c +1 -0
index 106e4500fd53..173fdc261882 100644
@@ -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);
Signature · 1 line
2.26.2

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
Quoted 8 lines · Baoquan He
Quoted 2 lines · Alexander Egorenkov

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count").

This patch is merged into 5.11-rc1, but we met the makedumpfile failure of kdump test case in 5.10.0 kernel. Should affect 5.9 too since commit 9a56493f6942 is merged into 5.9-rc2.

Quoted 8 lines

Below tag and CC should have been added into patch when posted.

Fixes commit 9a56493f6942 ("uts: Use generic ns_common::count")

Hi Greg,

Do we still have chance to make it added into stable?

Sure, what is the git commit id of this patch in Linus's tree?

In the future, please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

thanks,

greg k-h

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#5 lore raw
Quoted 11 lines · Greg KH
Quoted 10 lines · Baoquan He
Quoted 2 lines · Alexander Egorenkov

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count").

This patch is merged into 5.11-rc1, but we met the makedumpfile failure of kdump test case in 5.10.0 kernel. Should affect 5.9 too since commit 9a56493f6942 is merged into 5.9-rc2.

Below tag and CC should have been added into patch when posted.

Quoted 8 lines
Quoted 6 lines
Fixes commit 9a56493f6942 ("uts: Use generic ns_common::count")

Hi Greg,

Do we still have chance to make it added into stable?

Sure, what is the git commit id of this patch in Linus's tree?

This commit:

ca4a9241cc5e kdump: append uts_namespace.name offset to VMCOREINFO

Quoted 4 lines

In the future, please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

Sure, will do as the doc said in the future, thanks a lot for the pointer.

Thanks
Baoquan

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#6 lore raw
In reply to Baoquan He

Hi Baoquan,

-----Original Message-----

Quoted 7 lines · Alexander Egorenkov
Quoted 2 lines

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count").

This patch is merged into 5.11-rc1, but we met the makedumpfile failure of kdump test case in 5.10.0 kernel. Should affect 5.9 too since commit 9a56493f6942 is merged into 5.9-rc2.

Hmm, commit 9a56493f6942 should have been merged into 5.11-rc1 together with commit ca4a9241cc5e.

Does your makedumpfile have the following patch?
https://github.com/makedumpfile/makedumpfile/commit/54aec3878b3f91341e6bc735eda158cca5c54ec9

or am I missing something?

Thanks,
Kazu

Quoted 60 lines

Below tag and CC should have been added into patch when posted.

Fixes commit 9a56493f6942 ("uts: Use generic ns_common::count")

Hi Greg,

Do we still have chance to make it added into stable?

Thanks
Baoquan

Quoted 18 lines

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.

---

v2 -> v3:
* Added documentation to vmcoreinfo.rst
* Use the short form of the commit reference

v1 -> v2:
* Improved commit message
* Added link to the discussion of the uts namespace changes

Review

Quoted 5 lines
 Documentation/admin-guide/kdump/vmcoreinfo.rst | 6 ++++++
 kernel/crash_core.c                            | 1 +
 2 files changed, 7 insertions(+)
(quoted diff) +0 -0

b/Documentation/admin-guide/kdump/vmcoreinfo.rst

Quoted 23 lines

index e44a6c01f336..3861a25faae1 100644

Documentation/admin-guide/kdump/vmcoreinfo.rst +6 -0
@@ -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
 ---------------
 
kernel/crash_core.c +0 -0
index 106e4500fd53..173fdc261882 100644
@@ -447,6 +447,7 @@ static int __init crash_save_vmcoreinfo_init(void)
 	VMCOREINFO_PAGESIZE(PAGE_SIZE);
 
Quoted 14 lines
Quoted 8 lines
kernel/crash_core.c +1 -1
 	VMCOREINFO_SYMBOL(init_uts_ns);
+	VMCOREINFO_OFFSET(uts_namespace, name);
 	VMCOREINFO_SYMBOL(node_online_map);
 #ifdef CONFIG_MMU
 	VMCOREINFO_SYMBOL_ARRAY(swapper_pg_dir);
--

2.26.2

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#7 lore raw
Quoted 7 lines · HAGIO KAZUHITO(萩尾 一仁)

Hi Baoquan,

-----Original Message-----

Quoted 4 lines · Alexander Egorenkov
Quoted 2 lines

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count").

Quoted 6 lines
Quoted 3 lines

This patch is merged into 5.11-rc1, but we met the makedumpfile failure of kdump test case in 5.10.0 kernel. Should affect 5.9 too since commit 9a56493f6942 is merged into 5.9-rc2.

Hmm, commit 9a56493f6942 should have been merged into 5.11-rc1 together with commit ca4a9241cc5e.

Checked on master branch of mainline kernel, commit 9a56493f6942 is in 5.9-rc1. commit ca4a9241cc5e is merged into 5.11-rc1.

commit 9a56493f6942c0e2df1579986128721da96e00d8

Author: Kirill Tkhai <[email protected]>
Date:   Mon Aug 3 13:16:21 2020 +0300

uts: Use generic ns_common::count

commit ca4a9241cc5e718de86a34afd41972869546a5e3

Author: Alexander Egorenkov <[email protected]>
Date:   Tue Dec 15 20:45:31 2020 -0800

kdump: append uts_namespace.name offset to VMCOREINFO

Quoted 3 lines

Does your makedumpfile have the following patch?
https://github.com/makedumpfile/makedumpfile/commit/54aec3878b3f91341e6bc735eda158cca5c54ec9

We met this issue on 5.10 kernel, the latest makedumpfile 1.6.8+ fixs it. Makedumpfile 1.6.8+ includes the commit 54aec3878b3f. Not sure if I got the kernel commit right in their corresponding release.

Thanks
Baoquan

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#8 lore raw
Quoted 12 lines · Baoquan He
Quoted 11 lines · HAGIO KAZUHITO(萩尾 一仁)

Hi Baoquan,

-----Original Message-----

Quoted 7 lines · Alexander Egorenkov
Quoted 2 lines

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count").

This patch is merged into 5.11-rc1, but we met the makedumpfile failure of kdump test case in 5.10.0 kernel. Should affect 5.9 too since commit 9a56493f6942 is merged into 5.9-rc2.

Quoted 5 lines
Quoted 2 lines

Hmm, commit 9a56493f6942 should have been merged into 5.11-rc1 together with commit ca4a9241cc5e.

Checked on master branch of mainline kernel, commit 9a56493f6942 is in 5.9-rc1.

No, that commit is in 5.11-rc1, not 5.9-rc1:

	$ git describe --contains 9a56493f6942
	v5.11-rc1~182^2~9
Quoted 6 lines

commit ca4a9241cc5e is merged into 5.11-rc1.

commit 9a56493f6942c0e2df1579986128721da96e00d8

Author: Kirill Tkhai <[email protected]>
Date:   Mon Aug 3 13:16:21 2020 +0300
Quoted 8 lines

uts: Use generic ns_common::count

commit ca4a9241cc5e718de86a34afd41972869546a5e3

Author: Alexander Egorenkov <[email protected]>
Date:   Tue Dec 15 20:45:31 2020 -0800

kdump: append uts_namespace.name offset to VMCOREINFO

Are you all sure this is needed in 5.10.y?

thanks,

greg k-h

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#9 lore raw
Quoted 16 lines · On 01/11/21 at 10:16am, [email protected] wrote:
Quoted 15 lines · Baoquan He
Quoted 13 lines · HAGIO KAZUHITO(萩尾 一仁)

Hi Baoquan,

-----Original Message-----

Quoted 7 lines · Alexander Egorenkov
Quoted 2 lines

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count").

This patch is merged into 5.11-rc1, but we met the makedumpfile failure of kdump test case in 5.10.0 kernel. Should affect 5.9 too since commit 9a56493f6942 is merged into 5.9-rc2.

Hmm, commit 9a56493f6942 should have been merged into 5.11-rc1 together with commit ca4a9241cc5e.

Quoted 7 lines
Quoted 2 lines

Checked on master branch of mainline kernel, commit 9a56493f6942 is in 5.9-rc1.

No, that commit is in 5.11-rc1, not 5.9-rc1:

	$ git describe --contains 9a56493f6942
	v5.11-rc1~182^2~9

Oh, then I was wrong about it. I add linux-next repo in my linux kernel folder, so I can't get it with the above command on master branch of mainline kernel:

[bhe@~ linux]$ git describe --contains 9a56493f6942 next-20200820~107^2~8

I just use 'git log --oneline' and found out commit 9a56493f6942 is added before 5.9-rc1. Seems this is not right way to get the kernel release. So please ignore the back porting request of stable tree. Sorry about the confusion.

Thanks
Baoquan

Quoted 19 lines
Quoted 7 lines

commit ca4a9241cc5e is merged into 5.11-rc1.

commit 9a56493f6942c0e2df1579986128721da96e00d8

Author: Kirill Tkhai <[email protected]>
Date:   Mon Aug 3 13:16:21 2020 +0300
Quoted 8 lines

uts: Use generic ns_common::count

commit ca4a9241cc5e718de86a34afd41972869546a5e3

Author: Alexander Egorenkov <[email protected]>
Date:   Tue Dec 15 20:45:31 2020 -0800

kdump: append uts_namespace.name offset to VMCOREINFO

Are you all sure this is needed in 5.10.y?

Quoted 8 lines

thanks,

greg k-h

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#10 lore raw
In reply to Baoquan He
Quoted 8 lines · Baoquan He
Quoted 2 lines · Alexander Egorenkov

The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count").

This patch is merged into 5.11-rc1, but we met the makedumpfile failure of kdump test case in 5.10.0 kernel. Should affect 5.9 too since commit 9a56493f6942 is merged into 5.9-rc2.

Quoted 8 lines

Below tag and CC should have been added into patch when posted.

Fixes commit 9a56493f6942 ("uts: Use generic ns_common::count")

Hi Greg,

Do we still have chance to make it added into stable?

Wait, 9a56493f6942 ("uts: Use generic ns_common::count") is in 5.11-rc1, and this commit fixes that one, so why does anything need to be backported?

Are you _SURE_ that this commit is needed in 5.10.y?

thanks,

greg k-h

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec