Skip to contentSkip to conversation

makedumpfile: Xen fixes and cleanups

PATCH In review Daniel Kiper 2 participants 23 messages Dec 2, 2013 – Sep 1, 2014

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

v2 cover makedumpfile: Xen fixes and cleanups

Hi,

This is second version of patch series containing following
makedumpfile Xen fixes and cleanups:
- makedumpfile/xen: Add cache_init() call to initial_xen(),
- makedumpfile/xen: Disable cyclic mode for every Xen crash dump,
- makedumpfile/xen: Fail immediately on every architecture if dump level is invalid,
- makedumpfile/xen: Move cyclic mode check from initial() to initial_xen().

All patches were tested with Xen versions up to latest unstable.

Please apply.

Daniel

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

#1 lore raw

PATCH v2 1/4 makedumpfile/xen: Add cache_init() call to initial_xen()

Commit 92563d7a7a5175ef78c4a94ee269b1b455331b4c (cache: Allocate buffers at initialization to detect malloc() failure) split cache_alloc() to cache_init() and cache_alloc(). cache_init() is called in initial(). However, sadly initial_xen() is called before cache_init() and it uses cache_alloc() indirectly which refers to uninitialized structures. Hence, makedumfile run on Xen crash dumps finally fails. This patch adds cache_init() call to initial_xen() and fixes above mentioned issue. cache_init() is called in initial() if crash dump is not Xen one.

---
 makedumpfile.c |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
makedumpfile.c +15 -6
index 0c68f32..55e53b7 100644
@@ -3117,7 +3117,7 @@ out:
 		DEBUG_MSG("Buffer size for the cyclic mode: %ld\n", info->bufsize_cyclic);
 	}
 
-	if (!cache_init())
+	if (!is_xen_memory() && !cache_init())
 		return FALSE;
 
 	if (debug_info) {
@@ -7622,6 +7622,7 @@ exclude_xen_user_domain(void)
 int
 initial_xen(void)
 {
+	int xen_info_required = TRUE;
 	off_t offset;
 	unsigned long size;
 
@@ -7673,8 +7674,10 @@ initial_xen(void)
 		 * and get both the offset and the size.
 		 */
 		if (!has_vmcoreinfo_xen()){
-			if (!info->flag_exclude_xen_dom)
+			if (!info->flag_exclude_xen_dom) {
+				xen_info_required = FALSE;
 				goto out;
+			}
 
 			MSG("%s doesn't contain a vmcoreinfo for Xen.\n",
 			    info->name_memory);
@@ -7691,6 +7694,7 @@ initial_xen(void)
 			return FALSE;
 	}
 
+out:
 	if (!info->page_size) {
 		/*
 		 * If we cannot get page_size from a vmcoreinfo file,
@@ -7700,12 +7704,17 @@ initial_xen(void)
 			return FALSE;
 	}
 
-	if (!get_xen_info())
+	if (!cache_init())
 		return FALSE;
 
-	if (message_level & ML_PRINT_DEBUG_MSG)
-		show_data_xen();
-out:
+	if (xen_info_required == TRUE) {
+		if (!get_xen_info())
+			return FALSE;
+
+		if (message_level & ML_PRINT_DEBUG_MSG)
+			show_data_xen();
+	}
+
 	if (!get_max_mapnr())
 		return FALSE;
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 1/4 makedumpfile/xen: Add cache_init() call to initial_xen()

In reply to Daniel Kiper

Commit 92563d7a7a5175ef78c4a94ee269b1b455331b4c (cache: Allocate buffers at initialization to detect malloc() failure) split cache_alloc() to cache_init() and cache_alloc(). cache_init() is called in initial(). However, sadly initial_xen() is called before cache_init() and it uses cache_alloc() indirectly which refers to uninitialized structures. Hence, makedumfile run on Xen crash dumps finally fails. This patch adds cache_init() call to initial_xen() and fixes above mentioned issue. cache_init() is called in initial() if crash dump is not Xen one.

---
 makedumpfile.c |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
makedumpfile.c +15 -6
index 0c68f32..55e53b7 100644
@@ -3117,7 +3117,7 @@ out:
 		DEBUG_MSG("Buffer size for the cyclic mode: %ld\n", info->bufsize_cyclic);
 	}
 
-	if (!cache_init())
+	if (!is_xen_memory() && !cache_init())
 		return FALSE;
 
 	if (debug_info) {
@@ -7622,6 +7622,7 @@ exclude_xen_user_domain(void)
 int
 initial_xen(void)
 {
+	int xen_info_required = TRUE;
 	off_t offset;
 	unsigned long size;
 
@@ -7673,8 +7674,10 @@ initial_xen(void)
 		 * and get both the offset and the size.
 		 */
 		if (!has_vmcoreinfo_xen()){
-			if (!info->flag_exclude_xen_dom)
+			if (!info->flag_exclude_xen_dom) {
+				xen_info_required = FALSE;
 				goto out;
+			}
 
 			MSG("%s doesn't contain a vmcoreinfo for Xen.\n",
 			    info->name_memory);
@@ -7691,6 +7694,7 @@ initial_xen(void)
 			return FALSE;
 	}
 
+out:
 	if (!info->page_size) {
 		/*
 		 * If we cannot get page_size from a vmcoreinfo file,
@@ -7700,12 +7704,17 @@ initial_xen(void)
 			return FALSE;
 	}
 
-	if (!get_xen_info())
+	if (!cache_init())
 		return FALSE;
 
-	if (message_level & ML_PRINT_DEBUG_MSG)
-		show_data_xen();
-out:
+	if (xen_info_required == TRUE) {
+		if (!get_xen_info())
+			return FALSE;
+
+		if (message_level & ML_PRINT_DEBUG_MSG)
+			show_data_xen();
+	}
+
 	if (!get_max_mapnr())
 		return FALSE;
 
Signature · 7 lines
1.7.10.4


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

PATCH v2 2/4 makedumpfile/xen: Disable cyclic mode for every Xen crash dump

In reply to Daniel Kiper

Disable cyclic mode for every Xen crash dump not only when -X option is used. This way makedumpfile is much more flexible and different modes could be used to dump whole system memory (e.g. zero pages could be striped without requiring -X option).

---
 makedumpfile.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
makedumpfile.c +8 -8
index 55e53b7..5a378d1 100644
@@ -2928,20 +2928,20 @@ initial(void)
 	}
 #endif
 
-	if (info->flag_exclude_xen_dom) {
+	if (is_xen_memory()) {
 		if(info->flag_cyclic) {
 			info->flag_cyclic = FALSE;
 			MSG("Switched running mode from cyclic to non-cyclic,\n");
 			MSG("because the cyclic mode doesn't support Xen.\n");
 		}
+	}
 
-		if (!is_xen_memory()) {
-			MSG("'-X' option is disable,");
-			MSG("because %s is not Xen's memory core image.\n", info->name_memory);
-			MSG("Commandline parameter is invalid.\n");
-			MSG("Try `makedumpfile --help' for more information.\n");
-			return FALSE;
-		}
+	if (info->flag_exclude_xen_dom && !is_xen_memory()) {
+		MSG("'-X' option is disable,");
+		MSG("because %s is not Xen's memory core image.\n", info->name_memory);
+		MSG("Commandline parameter is invalid.\n");
+		MSG("Try `makedumpfile --help' for more information.\n");
+		return FALSE;
 	}
 
 	if (info->flag_refiltering) {
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH v2 2/4 makedumpfile/xen: Disable cyclic mode for every Xen crash dump

In reply to Daniel Kiper

Disable cyclic mode for every Xen crash dump not only when -X option is used. This way makedumpfile is much more flexible and different modes could be used to dump whole system memory (e.g. zero pages could be striped without requiring -X option).

---
 makedumpfile.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
makedumpfile.c +8 -8
index 55e53b7..5a378d1 100644
@@ -2928,20 +2928,20 @@ initial(void)
 	}
 #endif
 
-	if (info->flag_exclude_xen_dom) {
+	if (is_xen_memory()) {
 		if(info->flag_cyclic) {
 			info->flag_cyclic = FALSE;
 			MSG("Switched running mode from cyclic to non-cyclic,\n");
 			MSG("because the cyclic mode doesn't support Xen.\n");
 		}
+	}
 
-		if (!is_xen_memory()) {
-			MSG("'-X' option is disable,");
-			MSG("because %s is not Xen's memory core image.\n", info->name_memory);
-			MSG("Commandline parameter is invalid.\n");
-			MSG("Try `makedumpfile --help' for more information.\n");
-			return FALSE;
-		}
+	if (info->flag_exclude_xen_dom && !is_xen_memory()) {
+		MSG("'-X' option is disable,");
+		MSG("because %s is not Xen's memory core image.\n", info->name_memory);
+		MSG("Commandline parameter is invalid.\n");
+		MSG("Try `makedumpfile --help' for more information.\n");
+		return FALSE;
 	}
 
 	if (info->flag_refiltering) {
Signature · 7 lines
1.7.10.4


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

PATCH v2 3/4 makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Daniel Kiper

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +2 -2
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH v2 3/4 makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Daniel Kiper

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +2 -2
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
Signature · 7 lines
1.7.10.4


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

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

Quoted 16 lines · kexec

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +0 -0
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}

makedumpfile.c initial_xen(void) · line 7647

Quoted 10 lines
makedumpfile.c +2 -2
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Thanks
Atsushi Kumagai

Quoted 12 lines
makedumpfile.c +0 -0
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
Signature · 7 lines
1.7.10.4


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

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Daniel Kiper
Quoted 16 lines · kexec

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +0 -0
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}

makedumpfile.c initial_xen(void) · line 7647

Quoted 10 lines
makedumpfile.c +2 -2
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Thanks
Atsushi Kumagai

Quoted 12 lines
makedumpfile.c +0 -0
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
Signature · 7 lines
1.7.10.4


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

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

#9 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

Quoted 39 lines · Atsushi Kumagai
Quoted 16 lines · kexec

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +0 -0
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}

makedumpfile.c initial_xen(void) · line 7647

Quoted 10 lines
makedumpfile.c +2 -2
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view. However, I can not find any description how to do that. So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

Daniel

#10 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Atsushi Kumagai
Quoted 39 lines · Atsushi Kumagai
Quoted 16 lines · kexec

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +0 -0
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}

makedumpfile.c initial_xen(void) · line 7647

Quoted 10 lines
makedumpfile.c +2 -2
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view. However, I can not find any description how to do that. So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

Daniel

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

#11 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

Quoted 49 lines · kexec
Quoted 39 lines · Atsushi Kumagai
Quoted 16 lines · kexec

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +0 -0
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}

makedumpfile.c initial_xen(void) · line 7647

Quoted 10 lines
makedumpfile.c +2 -2
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Quoted 8 lines

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view.

I've reviewed the code for Xen, my understanding is the same as yours. The memory regions corresponding to hypervisor and DomU will remain even if specifying the dump level higher than 1.

Quoted 3 lines

However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

I'm sorry but I missed your point. Did you mention a lack of description in man page about an effect when specifying the dump level higher than 1 for Xen's memory ?
At least, I still think this patch is wrong because any dump level is effective for x86_64.

BTW, Ken'ichi still work for NEC but he is busy on other projects.

Thanks
Atsushi Kumagai

#12 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Daniel Kiper
Quoted 49 lines · kexec
Quoted 39 lines · Atsushi Kumagai
Quoted 16 lines · kexec

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +0 -0
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}

makedumpfile.c initial_xen(void) · line 7647

Quoted 10 lines
makedumpfile.c +2 -2
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Quoted 8 lines

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view.

I've reviewed the code for Xen, my understanding is the same as yours. The memory regions corresponding to hypervisor and DomU will remain even if specifying the dump level higher than 1.

Quoted 3 lines

However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

I'm sorry but I missed your point. Did you mention a lack of description in man page about an effect when specifying the dump level higher than 1 for Xen's memory ?
At least, I still think this patch is wrong because any dump level is effective for x86_64.

BTW, Ken'ichi still work for NEC but he is busy on other projects.

Thanks
Atsushi Kumagai

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

#13 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

Quoted 67 lines · Atsushi Kumagai
Quoted 49 lines · kexec
Quoted 39 lines · Atsushi Kumagai
Quoted 16 lines · kexec

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +0 -0
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}

makedumpfile.c initial_xen(void) · line 7647

Quoted 10 lines
makedumpfile.c +2 -2
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Quoted 8 lines

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view.

I've reviewed the code for Xen, my understanding is the same as yours. The memory regions corresponding to hypervisor and DomU will remain even if specifying the dump level higher than 1.

Quoted 3 lines

However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

Quoted 5 lines

I'm sorry but I missed your point. Did you mention a lack of description in man page about an effect when specifying the dump level higher than 1 for Xen's memory ?
At least, I still think this patch is wrong because any dump level is effective for x86_64.

Docs are not consistent because man and help displayed from makedumpfile are different. Additionally, even man says nothing how to use this feature on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO. I discovered that if you would like to use feature from above mentioned patch you must run makedumpfile in following way:

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux. However, It looks that there is another bug which prevents usage of this feature. It looks it is related to change in P2M tree Linux code. Once P2M levels where changed from 2 to 3. I fixed similar issue in crash tool once.

When are you going to make a new makedumpfile release? I am going to fix this issue before next release but now I am quite busy with other stuff.

Could you apply patches 1, 2 and 4 from this patch series? It looks that they are not controversial.

Daniel

#14 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Atsushi Kumagai
Quoted 67 lines · Atsushi Kumagai
Quoted 49 lines · kexec
Quoted 39 lines · Atsushi Kumagai
Quoted 16 lines · kexec

Do not try to process Xen crash dump on every architecture if dump level is invalid. Fail immediately and print relevant error message.

---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
makedumpfile.c +0 -0
index 5a378d1..45f96aa 100644
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}

makedumpfile.c initial_xen(void) · line 7647

Quoted 10 lines
makedumpfile.c +2 -2
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Quoted 8 lines

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view.

I've reviewed the code for Xen, my understanding is the same as yours. The memory regions corresponding to hypervisor and DomU will remain even if specifying the dump level higher than 1.

Quoted 3 lines

However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

Quoted 5 lines

I'm sorry but I missed your point. Did you mention a lack of description in man page about an effect when specifying the dump level higher than 1 for Xen's memory ?
At least, I still think this patch is wrong because any dump level is effective for x86_64.

Docs are not consistent because man and help displayed from makedumpfile are different. Additionally, even man says nothing how to use this feature on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO. I discovered that if you would like to use feature from above mentioned patch you must run makedumpfile in following way:

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux. However, It looks that there is another bug which prevents usage of this feature. It looks it is related to change in P2M tree Linux code. Once P2M levels where changed from 2 to 3. I fixed similar issue in crash tool once.

When are you going to make a new makedumpfile release? I am going to fix this issue before next release but now I am quite busy with other stuff.

Could you apply patches 1, 2 and 4 from this patch series? It looks that they are not controversial.

Daniel

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

#15 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

Quoted 49 lines · kexec
Quoted 37 lines
Quoted 20 lines
Quoted 11 lines

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Quoted 8 lines

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view.

I've reviewed the code for Xen, my understanding is the same as yours. The memory regions corresponding to hypervisor and DomU will remain even if specifying the dump level higher than 1.

Quoted 3 lines

However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

Quoted 5 lines

I'm sorry but I missed your point. Did you mention a lack of description in man page about an effect when specifying the dump level higher than 1 for Xen's memory ?
At least, I still think this patch is wrong because any dump level is effective for x86_64.

Docs are not consistent because man and help displayed from makedumpfile are different. Additionally, even man says nothing how to use this feature on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

Quoted 7 lines

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO. I discovered that if you would like to use feature from above mentioned patch you must run makedumpfile in following way:

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux.

Certainly the documents should be fixed as you said, I'll do it.

Quoted 4 lines

However, It looks that there is another bug which prevents usage of this feature. It looks it is related to change in P2M tree Linux code. Once P2M levels where changed from 2 to 3. I fixed similar issue in crash tool once.

Thanks for your pointing out, I hope that you will fix that issue also in makedumpfile.

Quoted 3 lines

When are you going to make a new makedumpfile release? I am going to fix this issue before next release but now I am quite busy with other stuff.

I must release the new version(v1.5.5) in the next week at the latest because I announced the release date will be the beginning of December and there are already many patches for v1.5.5.
So I would like to slip that fix you mentioned to v1.5.6.

Quoted 2 lines

Could you apply patches 1, 2 and 4 from this patch series? It looks that they are not controversial.

Sure, the three patches will be merged into v1.5.5.

Thanks
Atsushi Kumagai

Quoted 6 lines

Daniel

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

#16 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Daniel Kiper
Quoted 49 lines · kexec
Quoted 37 lines
Quoted 20 lines
Quoted 11 lines

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Quoted 8 lines

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view.

I've reviewed the code for Xen, my understanding is the same as yours. The memory regions corresponding to hypervisor and DomU will remain even if specifying the dump level higher than 1.

Quoted 3 lines

However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

Quoted 5 lines

I'm sorry but I missed your point. Did you mention a lack of description in man page about an effect when specifying the dump level higher than 1 for Xen's memory ?
At least, I still think this patch is wrong because any dump level is effective for x86_64.

Docs are not consistent because man and help displayed from makedumpfile are different. Additionally, even man says nothing how to use this feature on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

Quoted 7 lines

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO. I discovered that if you would like to use feature from above mentioned patch you must run makedumpfile in following way:

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux.

Certainly the documents should be fixed as you said, I'll do it.

Quoted 4 lines

However, It looks that there is another bug which prevents usage of this feature. It looks it is related to change in P2M tree Linux code. Once P2M levels where changed from 2 to 3. I fixed similar issue in crash tool once.

Thanks for your pointing out, I hope that you will fix that issue also in makedumpfile.

Quoted 3 lines

When are you going to make a new makedumpfile release? I am going to fix this issue before next release but now I am quite busy with other stuff.

I must release the new version(v1.5.5) in the next week at the latest because I announced the release date will be the beginning of December and there are already many patches for v1.5.5.
So I would like to slip that fix you mentioned to v1.5.6.

Quoted 2 lines

Could you apply patches 1, 2 and 4 from this patch series? It looks that they are not controversial.

Sure, the three patches will be merged into v1.5.5.

Thanks
Atsushi Kumagai

Quoted 6 lines

Daniel

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

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

#17 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

Quoted 1 line · Atsushi Kumagai

On 2013/12/10 19:41:54, kexec <[email protected]> wrote:

[...]

Quoted 10 lines
Quoted 10 lines

Docs are not consistent because man and help displayed from makedumpfile are different. Additionally, even man says nothing how to use this feature on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO. I discovered that if you would like to use feature from above mentioned patch you must run makedumpfile in following way:

Quoted 5 lines
Quoted 3 lines

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux.

Certainly the documents should be fixed as you said, I'll do it.

Thanks.

Quoted 7 lines
Quoted 4 lines

However, It looks that there is another bug which prevents usage of this feature. It looks it is related to change in P2M tree Linux code. Once P2M levels where changed from 2 to 3. I fixed similar issue in crash tool once.

Thanks for your pointing out, I hope that you will fix that issue also in makedumpfile.

Yes, I am going to do that but not now. I am just very busy. Additionally, I have discovered that this feature code is broken in more places because it was not maintained more than four years. So, to be honest, it is simply unusable right now.

Quoted 8 lines
Quoted 3 lines

When are you going to make a new makedumpfile release? I am going to fix this issue before next release but now I am quite busy with other stuff.

I must release the new version(v1.5.5) in the next week at the latest because I announced the release date will be the beginning of December and there are already many patches for v1.5.5.
So I would like to slip that fix you mentioned to v1.5.6.

OK.

Quoted 4 lines
Quoted 2 lines

Could you apply patches 1, 2 and 4 from this patch series? It looks that they are not controversial.

Sure, the three patches will be merged into v1.5.5.

Thanks.

Daniel

#18 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Atsushi Kumagai
Quoted 1 line · Atsushi Kumagai

On 2013/12/10 19:41:54, kexec <[email protected]> wrote:

[...]

Quoted 10 lines
Quoted 10 lines

Docs are not consistent because man and help displayed from makedumpfile are different. Additionally, even man says nothing how to use this feature on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO. I discovered that if you would like to use feature from above mentioned patch you must run makedumpfile in following way:

Quoted 5 lines
Quoted 3 lines

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux.

Certainly the documents should be fixed as you said, I'll do it.

Thanks.

Quoted 7 lines
Quoted 4 lines

However, It looks that there is another bug which prevents usage of this feature. It looks it is related to change in P2M tree Linux code. Once P2M levels where changed from 2 to 3. I fixed similar issue in crash tool once.

Thanks for your pointing out, I hope that you will fix that issue also in makedumpfile.

Yes, I am going to do that but not now. I am just very busy. Additionally, I have discovered that this feature code is broken in more places because it was not maintained more than four years. So, to be honest, it is simply unusable right now.

Quoted 8 lines
Quoted 3 lines

When are you going to make a new makedumpfile release? I am going to fix this issue before next release but now I am quite busy with other stuff.

I must release the new version(v1.5.5) in the next week at the latest because I announced the release date will be the beginning of December and there are already many patches for v1.5.5.
So I would like to slip that fix you mentioned to v1.5.6.

OK.

Quoted 4 lines
Quoted 2 lines

Could you apply patches 1, 2 and 4 from this patch series? It looks that they are not controversial.

Sure, the three patches will be merged into v1.5.5.

Thanks.

Daniel

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

#19 lore raw

RE: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

In reply to Atsushi Kumagai

Hello Daniel,

Quoted 54 lines · kexec
Quoted 53 lines
Quoted 37 lines
Quoted 20 lines
Quoted 11 lines

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Quoted 8 lines

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view.

I've reviewed the code for Xen, my understanding is the same as yours. The memory regions corresponding to hypervisor and DomU will remain even if specifying the dump level higher than 1.

Quoted 3 lines

However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

Quoted 5 lines

I'm sorry but I missed your point. Did you mention a lack of description in man page about an effect when specifying the dump level higher than 1 for Xen's memory ?
At least, I still think this patch is wrong because any dump level is effective for x86_64.

Docs are not consistent because man and help displayed from makedumpfile are different. Additionally, even man says nothing how to use this feature on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO. I discovered that if you would like to use feature from above mentioned patch you must run makedumpfile in following way:

Quoted 5 lines
Quoted 3 lines

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux.

Certainly the documents should be fixed as you said, I'll do it.

Sorry for my too late job, how about this fix ? I'll merge it into v1.5.7 if you have no objection.

Thanks
Atsushi Kumagai

From: Atsushi Kumagai <[email protected]>
Date: Fri, 29 Aug 2014 15:11:27 +0900
Subject: [PATCH] Fix description about filtering for Xen.

Correct the following points for Xen dump:

- Add how to filter the pages of domain-0.
- Fix the difference between man and help.

---
 makedumpfile.8 | 5 +++--
 print_info.c   | 5 ++++-
 2 files changed, 7 insertions(+), 3 deletions(-)
makedumpfile.8 +3 -2
index 25fe74e..0f51bf2 100644
@@ -150,8 +150,9 @@ Pages of the specified type are not copied to \fIDUMPFILE\fR. The page type
 marked in the following table is excluded. A user can specify multiple page
 types by setting the sum of each page type for dump_level. The maximum of
 dump_level is 31. Note that a dump_level for Xen dump filtering is 0 or 1 on
-a machine other than x86_64 (On an x86_64 machine, it is possible to specify
-2 or bigger as a dump_level).
+a machine other than x86_64. On a x86_64 machine, even 2 or bigger dump level
+will be effective if you specify domain-0's \fIvmlinux\fR with \-x option.
+Then the pages are excluded only from domain-0.
 .br
 If specifying multiple dump_levels with the delimiter ',', makedumpfile retries
 to create a \fIDUMPFILE\fR by other dump_level when "No space on device" error
print_info.c +4 -1
index 7592690..1fca7c3 100644
@@ -89,6 +89,9 @@ print_usage(void)
 	MSG("  Creating DUMPFILE of Xen:\n");
 	MSG("  # makedumpfile -E [--xen-syms XEN-SYMS|--xen-vmcoreinfo VMCOREINFO] VMCORE DUMPFILE\n");
 	MSG("\n");
+	MSG("  Filtering domain-0 of Xen:\n");
+	MSG("  # makedumpfile -E -d DL -x vmlinux VMCORE DUMPFILE\n");
+	MSG("\n");
 	MSG("  Generating VMCOREINFO of Xen:\n");
 	MSG("  # makedumpfile -g VMCOREINFO --xen-syms XEN-SYMS\n");
 	MSG("\n");
@@ -111,7 +114,7 @@ print_usage(void)
 	MSG("      marked in the following table is excluded. A user can specify multiple\n");
 	MSG("      page types by setting the sum of each page type for Dump_Level (DL).\n");
 	MSG("      The maximum of Dump_Level is 31.\n");
-	MSG("      Note that Dump_Level for Xen dump filtering is 0 or 1.\n");
+	MSG("      Note that Dump_Level for Xen dump filtering is 0 or 1 except on x86_64\n");
 	MSG("\n");
 	MSG("            |         cache    cache\n");
 	MSG("      Dump  |  zero   without  with     user    free\n");
Signature · 6 lines
1.9.0

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
author Reviewed-by
#20 lore raw

Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid

Quoted 56 lines · Atsushi Kumagai

Hello Daniel,

Quoted 54 lines · kexec
Quoted 53 lines
Quoted 37 lines
Quoted 20 lines
Quoted 11 lines

Did you say that dump level 2 or larger are no longer effective even for x86_64 ? I thought it works by the patch below, but I'm not sure about Xen. So I would like to know why you sent this patch.

commit ec5b5835a113cf62a168d4a7354564a38de6b52c

Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

[v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

Quoted 8 lines

This patch adds the dump filtering for excluding unnecessary pages (cache pages, user process data pages, and free pages) on on x86_64 xen domain-0.

On the existing makedumpfile (v1.3.3 or former), a user could specify 0 or 1 only as a dump_level. By this patch, he/she can specify 2 or larger also as a dump_level.

Now, this feature is effective on x86_64 machine only.

Quoted 8 lines

Hmmm... Thanks for this. I missed this patch. However, it looks that I do not understand something. AIUI, from Xen point of view we are not able to use dump level higher than 1 because there is no e.g. cache pages (it looks that we could also skip free pages but this stuff is not implemented). Above mentioned patch suggest that there is a way to extract just only Dom0 stuff taking into account Linux internals only. If my reasoning is true then dump level higher than 1 is possible only if we look at Dom0 from Linux point of view.

I've reviewed the code for Xen, my understanding is the same as yours. The memory regions corresponding to hypervisor and DomU will remain even if specifying the dump level higher than 1.

Quoted 3 lines

However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that he works for NEC still.

Quoted 5 lines

I'm sorry but I missed your point. Did you mention a lack of description in man page about an effect when specifying the dump level higher than 1 for Xen's memory ?
At least, I still think this patch is wrong because any dump level is effective for x86_64.

Docs are not consistent because man and help displayed from makedumpfile are different. Additionally, even man says nothing how to use this feature on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO. I discovered that if you would like to use feature from above mentioned patch you must run makedumpfile in following way:

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux.

Certainly the documents should be fixed as you said, I'll do it.

Sorry for my too late job, how about this fix ?

No problem. I am busy too. I still have patch fixing this feature for new Xen versions on my long todo list. I hope that I will be able to work on it at the beginning of next year.

Quoted 1 line

I'll merge it into v1.5.7 if you have no objection.

Great! Thanks!

Quoted 7 lines

Thanks
Atsushi Kumagai

From: Atsushi Kumagai <[email protected]>
Date: Fri, 29 Aug 2014 15:11:27 +0900
Subject: [PATCH] Fix description about filtering for Xen.

Quoted 7 lines

Correct the following points for Xen dump:

- Add how to filter the pages of domain-0.
- Fix the difference between man and help.

Daniel

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

#21 lore raw

PATCH v2 4/4 makedumpfile/xen: Move cyclic mode check from initial() to initial_xen()

In reply to Daniel Kiper

Move cyclic mode check from initial() to initial_xen(). Just small cleanup.

---
 makedumpfile.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
makedumpfile.c +6 -8
index 45f96aa..e173f85 100644
@@ -2928,14 +2928,6 @@ initial(void)
 	}
 #endif
 
-	if (is_xen_memory()) {
-		if(info->flag_cyclic) {
-			info->flag_cyclic = FALSE;
-			MSG("Switched running mode from cyclic to non-cyclic,\n");
-			MSG("because the cyclic mode doesn't support Xen.\n");
-		}
-	}
-
 	if (info->flag_exclude_xen_dom && !is_xen_memory()) {
 		MSG("'-X' option is disable,");
 		MSG("because %s is not Xen's memory core image.\n", info->name_memory);
@@ -7645,6 +7637,12 @@ initial_xen(void)
 		return FALSE;
 	}
 
+	if(info->flag_cyclic) {
+		info->flag_cyclic = FALSE;
+		MSG("Switched running mode from cyclic to non-cyclic,\n");
+		MSG("because the cyclic mode doesn't support Xen.\n");
+	}
+
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
Signature · 1 line
1.7.10.4
#22 lore raw

PATCH v2 4/4 makedumpfile/xen: Move cyclic mode check from initial() to initial_xen()

In reply to Daniel Kiper

Move cyclic mode check from initial() to initial_xen(). Just small cleanup.

---
 makedumpfile.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
makedumpfile.c +6 -8
index 45f96aa..e173f85 100644
@@ -2928,14 +2928,6 @@ initial(void)
 	}
 #endif
 
-	if (is_xen_memory()) {
-		if(info->flag_cyclic) {
-			info->flag_cyclic = FALSE;
-			MSG("Switched running mode from cyclic to non-cyclic,\n");
-			MSG("because the cyclic mode doesn't support Xen.\n");
-		}
-	}
-
 	if (info->flag_exclude_xen_dom && !is_xen_memory()) {
 		MSG("'-X' option is disable,");
 		MSG("because %s is not Xen's memory core image.\n", info->name_memory);
@@ -7645,6 +7637,12 @@ initial_xen(void)
 		return FALSE;
 	}
 
+	if(info->flag_cyclic) {
+		info->flag_cyclic = FALSE;
+		MSG("Switched running mode from cyclic to non-cyclic,\n");
+		MSG("because the cyclic mode doesn't support Xen.\n");
+	}
+
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
Signature · 7 lines
1.7.10.4


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