AKASHI Takahiro | 30 May 08:46 2016

[PATH v4 0/2] fix kernel memory map handling for kaslr-enabled kernel

changes in v4:
* Fixed VA_BITS calculation for v4.5 or earlier
* Added 4-level address translation with 4KB page size
* Removed "fix a renaming of a member of struct page, _count to _refcount"
* Removed "kmem <vmalloc addr>" issue description from a commit message
  (This was not a bug.)

Chnages in v3:
* Refined KASLR handling
  hopefully the tool works even on a live system if CONFIG_RANDOMIZE_RAM is
  not configured
* Fixed a renaming of a member of struct page
* Removed a commit message regarding an issue of backtracing a panic'ed task
  because this is not a bug in this tool, but my kdump patch's.
* Reported "kmem <vmalloc addr>" issue in a commit message

changes in v2:
* Fixed build warnings
* Moved ARM64_NEW_VMEMMAP to machdep->flags
* Show additional kaslr-related parameters in arm64_dump_machdep_table()
* Handle a VMCOREINFO, "NUMBER(kimage_voffset)"

AKASHI Takahiro (2):
  arm64: fix kernel memory map handling for kaslr-enabled kernel
  arm64: add 4-level translation

 arm64.c   | 338 +++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 defs.h    |  49 +++++++--
 main.c    |   7 +-
 symbols.c |  12 ++-
(Continue reading)

AKASHI Takahiro | 27 May 13:03 2016

[PATH v3 0/3] arm64: fix kernel memory map handling for kaslr-enabled kernel

Not a big jump from v2, but ...

Chnages in v3:
* Refined KASLR handling
  hopefully the tool works even on a live system if CONFIG_RANDOMIZE_RAM is
  not configured
* Fixed a renaming of a member of struct page
* Removed a commit message regarding an issue of backtracing a panic'ed task
  because this is not a bug in this tool, but my kdump patch's.
* Reported "kmem <vmalloc addr>" issue in a commit message

changes in v2:
* Fixed build warnings
* Moved ARM64_NEW_VMEMMAP to machdep->flags
* Show additional kaslr-related parameters in arm64_dump_machdep_table()
* Handle a VMCOREINFO, "NUMBER(kimage_voffset)"

AKASHI Takahiro (3):
  arm64: fix kernel memory map handling for kaslr-enabled kernel
  fix a renaming of a member of struct page, _count to _refcount
  arm64: show a warning for 48-bit kernel with 4KB page

 arm64.c   | 219 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
 defs.h    |  24 +++++--
 main.c    |   7 +-
 memory.c  |   6 +-
 symbols.c |  12 ++--
 5 files changed, 204 insertions(+), 64 deletions(-)

--

-- 
(Continue reading)

AKASHI Takahiro | 24 May 12:02 2016

[PATCH v2] arm64: fix kernel memory map handling for kaslr-enabled kernel

Yet some issues, but ...

changes in v2:
* Fixed build warnings
* Moved ARM64_NEW_VMEMMAP to machdep->flags
* Show additional kaslr-related parameters in arm64_dump_machdep_table()
* Handle a VMCOREINFO, "NUMBER(kimage_voffset)"

===8<===
>From 080a54ec232ac48ef2d8123cbedcf0f1fe27e391 Mon Sep 17 00:00:00 2001
From: AKASHI Takahiro <takahiro.akashi <at> linaro.org>
Date: Mon, 16 May 2016 17:31:55 +0900
Subject: [PATCH v2] arm64: fix kernel memory map handling for kaslr-enabled
 kernel

In kernel v4.6, Kernel ASLR (KASLR) is supported on arm64, and the start
address of the kernel image can be randomized if CONFIG_RANDOMIZE_BASE is
enabled.
Even worse, the kernel image is no more mapped in the linear mapping, but
in vmalloc area (i.e. below PAGE_OFFSET).

Now, according to the kernel's memory.h, converting a virtual address to
a physical address should be done like below:

	phys_addr_t __x = (phys_addr_t)(x);                             \
	__x & BIT(VA_BITS - 1) ? (__x & ~PAGE_OFFSET) + PHYS_OFFSET :   \
				 (__x - kimage_voffset); })

Please note that PHYS_OFFSET is no more equal to the start address of
the first usable memory block in SYSTEM RAM due to the fact mentioned
(Continue reading)

AKASHI Takahiro | 20 May 07:46 2016

[PATCH v1] arm64: fix kernel memory map handling for kaslr-enabled

Hi,

This patch is still rough-edged, but please review it and
any comments are very welcome.
I will try to fix the known issues before I submit a new
version of kexec/kdump patch for v4.7 merge window.

Thanks,
-Takahiro AKASHI

===8<===
>From fdc7c881d98ef00ed1ff38a058b4913a1d5bcda6 Mon Sep 17 00:00:00 2001
From: AKASHI Takahiro <takahiro.akashi <at> linaro.org>
Date: Mon, 16 May 2016 17:31:55 +0900
Subject: [PATCH v1] arm64: fix kernel memory map handling for kaslr-enabled
 kernel

In kernel v4.6, Kernel ASLR (KASLR) is supported on arm64, and the start
address of the kernel image can be randomized if CONFIG_RANDOMIZE_BASE is
enabled.
Even worse, the kernel image is no more mapped in the linear mapping, but
in vmalloc area (i.e. below PAGE_OFFSET).

Now, according to the kernel's memory.h, converting a virtual address to
a physical address should be done like below:

	phys_addr_t __x = (phys_addr_t)(x);                             \
	__x & BIT(VA_BITS - 1) ? (__x & ~PAGE_OFFSET) + PHYS_OFFSET :   \
				 (__x - kimage_voffset); })

(Continue reading)

Andrey Skvortsov | 19 May 17:49 2016
Picon

[PATCH 1/2] memory.c: fix missing printf flags in INFO message in page_flags_init_from_pageflag_names()

Signed-off-by: Andrey Skvortsov <andrej.skvortzov <at> gmail.com>
---
 memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/memory.c b/memory.c
index 275fc34..d6271bc 100644
--- a/memory.c
+++ b/memory.c
 <at>  <at>  -6353,7 +6353,7  <at>  <at>  page_flags_init_from_pageflag_names(void)
 		}

 		if (!read_string((ulong)name, namebuf, BUFSIZE-1)) {
-			error(INFO, "failed to read pageflag_names entry\n",
+			error(INFO, "failed to read pageflag_names entry (i: %d, name: \"%s\", mask:%d)\n",
 				i, name, mask);
 			goto pageflags_fail;
 		}
--

-- 
2.8.1

Pankaj Gupta | 16 May 15:47 2016
Picon

[PATCH 0/2] qemu: Parse necessary sections in crash added in qemu

Qemu migration code added new sections to add features
for live migration of VM. For loading vmcore file captured
with 'virsh dump' we need to parse these sections in crash.

This series contains two patches, which parse these sections:

patch1: parse 'vm_configuration' section
patch2: parse 'vm_footer' section

 qemu-load.c |   20 ++++++++++++++++++++
 qemu-load.h |    4 +++-
 2 files changed, 23 insertions(+), 1 deletion(-)

OGAWA Hirofumi | 4 May 19:07 2016
Picon

Fix loading qemu's dump-guest-image

qemu can make elf vmcore without kdump in kernel. So kernel may not
have "kexec_crash_image" symbol.

Without this patch, kdump_backup_region_init() stops main_loop with
error.

---

 netdump.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff -puN netdump.c~check-kexec_crash_image netdump.c
--- crash-64/netdump.c~check-kexec_crash_image	2016-03-29 19:38:08.556253626 +0900
+++ crash-64-hirofumi/netdump.c	2016-03-29 19:38:08.557253630 +0900
 <at>  <at>  -4458,11 +4458,14  <at>  <at>  kdump_backup_region_init(void)
 	} else
 		return;

-	if (!readmem(symbol_value("kexec_crash_image"), KVADDR,
-		     &kexec_crash_image_p, sizeof(ulong),
-		     "kexec backup region: kexec_crash_image",
-		     QUIET|RETURN_ON_ERROR))
-		goto error;
+	if (symbol_exists("kexec_crash_image")) {
+		if (!readmem(symbol_value("kexec_crash_image"), KVADDR,
+			     &kexec_crash_image_p, sizeof(ulong),
+			     "kexec backup region: kexec_crash_image",
+			     QUIET|RETURN_ON_ERROR))
+			goto error;
+	} else
(Continue reading)

Oleg Nesterov | 3 May 19:35 2016
Picon

[PATCH v3 0/9] teach crash to work with "live" ramdump

Hi Dave,

Based on your comments, please see the interdiff below.

Changes:

	- s/LIVEDUMP/LIVE_RAMDUMP/

	- redefine LOCAL_ACTIVE() using LIVE_RAMDUMP

	- change pc->dumpfile to be the name of the first ramdump file

	- remove the stale label in ramdump_to_elf()

Oleg.
---

diff --git a/defs.h b/defs.h
index d3a03c1..61497a5 100644
--- a/defs.h
+++ b/defs.h
 <at>  <at>  -212,7 +212,7  <at>  <at>  struct number_option {
 #define DEVMEM                (0x2000000ULL)
 #define REM_LIVE_SYSTEM       (0x4000000ULL)
 #define NAMELIST_LOCAL        (0x8000000ULL)
-#define LIVEDUMP             (0x10000000ULL)
+#define LIVE_RAMDUMP         (0x10000000ULL)
 #define NAMELIST_SAVED       (0x20000000ULL)
 #define DUMPFILE_SAVED       (0x40000000ULL)
 #define UNLINK_NAMELIST      (0x80000000ULL) 
(Continue reading)

Oleg Nesterov | 29 Apr 18:21 2016
Picon

PATCH v2 00/10] teach crash to work with "live" ramdump

Hi Dave,

please consider V2, I tried to address your comments.

Oleg.

 defs.h    |  8 +++++---
 filesys.c | 10 ++++++----
 kernel.c  |  9 ++++++---
 main.c    | 13 ++++++++++++-
 memory.c  |  1 +
 ramdump.c | 32 ++++++++++++++++++--------------
 remote.c  |  4 ++--
 task.c    | 13 ++++++-------
 tools.c   |  2 +-
 9 files changed, 57 insertions(+), 35 deletions(-)

Dave Anderson | 27 Apr 22:18 2016
Picon
Gravatar

[ANNOUNCE] crash version 7.1.5 is available


Download from: http://people.redhat.com/anderson
                 or
               https://github.com/crash-utility/crash/releases

The github master branch serves as a development branch that will contain 
all patches that are queued for the next release:

  $ git clone git://github.com/crash-utility/crash.git

Changelog:

 - Fix for the handling of Xen DomU ELF dumpfiles to prevent the
   pre-gathering of p2m frames during session initialization, which
   is unnecessary since ELF files contain the mapping information in 
   their ".xen_p2m" section.  Without the patch, it is possible that the 
   crash session may be unnecessarily aborted if the p2m frame-gathering
   fails, for example, if the CR3 value in the header is invalid.
   (ptesarik <at> suse.com)

 - Fix for the translation of X86_64 virtual addresses in the vsyscall 
   region between 0xffffffffff600000 and 0xffffffffffe00000.  Without
   the patch, the reading of addresses in that region returns invalid 
   data; in addition, the "vtop" command for an address in that region
   shows an invalid physical address under the "PHYSICAL" column. 
   (nakajima.akira <at> nttcom.co.jp, anderson <at> redhat.com)

 - Make the "zero excluded" mode default behavior when analyzing SADUMP
   dumpfiles because some Fujitsu troubleshooting software assumes the
   behavior.  Also, fix the "set -v" option to show the "zero_excluded"
(Continue reading)

Erlandsson, Johan | 27 Apr 11:20 2016

[PATCH] arm64: support MAX_PHYSMEM_BITS=48

Hi,

This match update made in file 'arch/arm64/include/asm/sparsemem.h'.

commit 07a15dd55a3d65f81b4b09eab293f4afc720b082
arm64: mm: update max pa bits to 48
---
 arm64.c | 5 ++++-
 defs.h  | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arm64.c b/arm64.c
index d1c9c3e..34c8c59 100644
--- a/arm64.c
+++ b/arm64.c
 <at>  <at>  -267,7 +267,10  <at>  <at>  arm64_init(int when)
        case POST_GDB:
                arm64_calc_virtual_memory_ranges();
                machdep->section_size_bits = _SECTION_SIZE_BITS;
-               machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
+               if (THIS_KERNEL_VERSION >= LINUX(3,17,0))
+                       machdep->max_physmem_bits = _MAX_PHYSMEM_BITS_3_17;
+               else
+                       machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
                ms = machdep->machspec;

                if (THIS_KERNEL_VERSION >= LINUX(4,0,0)) {
diff --git a/defs.h b/defs.h
index a1746cc..a09fa9a 100644
--- a/defs.h
(Continue reading)


Gmane