[PATCH 3/4] Makedumpfile: Add a new function check_5level_paging()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use it to check if the corrupted kernel is in 5-level paging.

Signed-off-by: Baoquan He <bhe@xxxxxxxxxx>
---
 arch/x86_64.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/x86_64.c b/arch/x86_64.c
index cbe45c2..e88ee0b 100644
--- a/arch/x86_64.c
+++ b/arch/x86_64.c
@@ -33,6 +33,15 @@ get_xen_p2m_mfn(void)
 	return NOT_FOUND_LONG_VALUE;
 }
 
+static int
+check_5level_paging(void)
+{
+	if (NUMBER(pgtable_l5_enabled) != 0)
+		return TRUE;
+	else
+		return FALSE;
+}
+
 unsigned long
 get_kaslr_offset_x86_64(unsigned long vaddr)
 {
-- 
2.13.6


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux