Skip to contentSkip to conversation

xen: Enforce page size when it could not be established by other means

PATCH In review Daniel Kiper 2 participants 2 messages Jul 22, 2013 – Jul 23, 2013

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

PATCH v3 1/1 xen: Enforce page size when it could not be established by other means

Enforce page size when it could not be established by other means.

v3 - suggestions/fixes:
- rearrange code for readability
(suggested by Atsushi Kumagai).

---
 makedumpfile.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
makedumpfile.c +10 -2
index b42565c..20a547b 100644
@@ -7324,8 +7324,6 @@ initial_xen(void)
 #endif
 	if (!init_xen_crash_info())
 		return FALSE;
-	if (!fallback_to_current_page_size())
-		return FALSE;
 	/*
 	 * Get the debug information for analysis from the vmcoreinfo file
 	 */
@@ -7370,6 +7368,16 @@ initial_xen(void)
 		if (!read_vmcoreinfo_from_vmcore(offset, size, TRUE))
 			return FALSE;
 	}
+
+	if (!info->page_size) {
+		/*
+		 * If we cannot get page_size from a vmcoreinfo file,
+		 * fall back to the current kernel page size.
+		 */
+		if (!fallback_to_current_page_size())
+			return FALSE;
+	}
+
 	if (!get_xen_info())
 		return FALSE;
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 7 lines · On Mon, 22 Jul 2013 23:19:15 +0200 Daniel Kiper…

Enforce page size when it could not be established by other means.

v3 - suggestions/fixes:
- rearrange code for readability
(suggested by Atsushi Kumagai).

Thanks for all your work !
I'll merge your v3 patchset into makedumpfile-1.5.5.

Atsushi Kumagai

Quoted 36 lines
---
 makedumpfile.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
makedumpfile.c +10 -2
index b42565c..20a547b 100644
@@ -7324,8 +7324,6 @@ initial_xen(void)
 #endif
 	if (!init_xen_crash_info())
 		return FALSE;
-	if (!fallback_to_current_page_size())
-		return FALSE;
 	/*
 	 * Get the debug information for analysis from the vmcoreinfo file
 	 */
@@ -7370,6 +7368,16 @@ initial_xen(void)
 		if (!read_vmcoreinfo_from_vmcore(offset, size, TRUE))
 			return FALSE;
 	}
+
+	if (!info->page_size) {
+		/*
+		 * If we cannot get page_size from a vmcoreinfo file,
+		 * fall back to the current kernel page size.
+		 */
+		if (!fallback_to_current_page_size())
+			return FALSE;
+	}
+
 	if (!get_xen_info())
 		return FALSE;
 
Signature · 1 line
1.7.10.4