[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse-commit
Subject:    commit crash for openSUSE:Factory
From:       root () hilbert ! suse ! de (root)
Date:       2017-11-30 11:46:13
Message-ID: 20171130114613.4EAC611A43 () hilbert ! suse ! de
[Download RAW message or body]

Hello community,

here is the log from the commit of package crash for openSUSE:Factory checked in at 2017-11-30 12:46:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crash (Old)
 and      /work/SRC/openSUSE:Factory/.crash.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crash"

Thu Nov 30 12:46:07 2017 rev:144 rq:546548 version:7.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/crash/crash.changes	2017-11-16 14:02:15.526919747 +0100
+++ /work/SRC/openSUSE:Factory/.crash.new/crash.changes	2017-11-30 12:46:10.496209707 +0100
@@ -1,0 +2,12 @@
+Wed Nov 29 17:45:11 UTC 2017 - dmair@suse.com
+
+- Added crash-x86_64_kvtop-usable-symtab_init.patch to change 
+  x86_64_kvtop() so that it can be called during symtab_init()
+
+  Added crash-allow-use-of-sadump-captured-KASLR-kernel.patch to
+  allow use of dumps of KASLR enabled kernels that were captured
+  by sadump.
+
+  Both are bsc#1070278/FATE#323473
+
+-------------------------------------------------------------------

New:
----
  crash-allow-use-of-sadump-captured-KASLR-kernel.patch
  crash-x86_64_kvtop-usable-symtab_init.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ crash.spec ++++++
--- /var/tmp/diff_new_pack.3g440d/_old	2017-11-30 12:46:12.928121301 +0100
+++ /var/tmp/diff_new_pack.3g440d/_new	2017-11-30 12:46:12.932121156 +0100
@@ -84,6 +84,8 @@
 Patch16:        eppic-support-arm64.patch
 Patch18:        %{name}-stop_read_error_when_intent_is_retry.patch
 Patch19:        %{name}-ppc64-book3s-update-hash-page-table-geometry.patch
+Patch20:        %{name}-x86_64_kvtop-usable-symtab_init.patch
+Patch21:        %{name}-allow-use-of-sadump-captured-KASLR-kernel.patch
 Patch90:        %{name}-sial-ps-2.6.29.diff
 BuildRequires:  bison
 BuildRequires:  flex
@@ -280,6 +282,8 @@
 %patch13 -p1
 %patch18 -p1
 %patch19 -p1
+%patch20 -p1
+%patch21 -p1
 %if %{have_snappy}
 %patch15 -p1
 %endif

++++++ crash-allow-use-of-sadump-captured-KASLR-kernel.patch ++++++
++++ 605 lines (skipped)


++++++ crash-x86_64_kvtop-usable-symtab_init.patch ++++++
This patch changes x86_64_kvtop() so that it can be called during
symtab_init().

To solve kaslr problem of sadump, kaslr offset and phys_base need to be
calculated before symbol data is loaded. This calculation needs
translation of kernel virtual address to physical address. Current
x86_64_kvtop() implementation tries to use x86_64_VTOP for translation
at first, but this does not work for this purpose because x86_64_VTOP
uses phys_base. x86_64_kvtop() need to be changed to skip x86_64_VTOP()
during sadump initialization.

Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com>
---
 x86_64.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/x86_64.c b/x86_64.c
index 6e60dda..2f9e6db 100644
--- a/x86_64.c
+++ b/x86_64.c
@@ -194,6 +194,9 @@ x86_64_init(int when)
 			machdep->machspec->kernel_image_size = dtol(string, QUIET, NULL);
 			free(string);
 		}
+		if (SADUMP_DUMPFILE())
+			/* Need for calculation of kaslr_offset and phys_base */
+			machdep->kvtop = x86_64_kvtop;
 		break;
 
 	case PRE_GDB:
@@ -2019,6 +2022,22 @@ x86_64_kvtop(struct task_context *tc, ulong kvaddr, physaddr_t *paddr, int verbo
 	ulong pte;
 	physaddr_t physpage;
 
+	if (SADUMP_DUMPFILE() && !(machdep->flags & KSYMS_START)) {
+		/*
+		 * In the case of sadump, to calculate kaslr_offset and
+		 * phys_base, kvtop is called during symtab_init(). In this
+		 * stage phys_base is not initialized yet and x86_64_VTOP()
+		 * does not work. Jump to the code of pagetable translation.
+		 */
+		FILL_PML4();
+		pml4 = ((ulong *)machdep->machspec->pml4) + pml4_index(kvaddr);
+		if (verbose) {
+			fprintf(fp, "PML4 DIRECTORY: %lx\n", vt->kernel_pgd[0]);
+			fprintf(fp, "PAGE DIRECTORY: %lx\n", *pml4);
+		}
+		goto start_vtop_with_pagetable;
+	}
+
         if (!IS_KVADDR(kvaddr))
                 return FALSE;
 
@@ -2065,6 +2084,8 @@ x86_64_kvtop(struct task_context *tc, ulong kvaddr, physaddr_t *paddr, int verbo
                		fprintf(fp, "PAGE DIRECTORY: %lx\n", *pml4);
 		}
 	}
+
+start_vtop_with_pagetable:
 	if (!(*pml4) & _PAGE_PRESENT)
 		goto no_kpage;
 	pgd_paddr = (*pml4) & PHYSICAL_PAGE_MASK;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic