Hello Dave, Could you merge two sadump related bug fix patches? -- Thanks. HATAYAMA, Daisuke
>From 6cea6889ca4771541f1ec6449eba7627ad93084c Mon Sep 17 00:00:00 2001 From: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx> Date: Wed, 7 Oct 2015 09:55:41 +0900 Subject: [PATCH 1/2] sadump, bugfix: Change bit order sadump formats associate each bit in a bitmap with a physical page in reverse order with the kdump-compressed format. We had not detected this bug for considerably long term because bitmaps in sadump formats consist mostly of 0x00 and 0xff excluding a very limited amount of memory space for firmware. Signed-off-by: Takao Indoh <indou.takao@xxxxxxxxxxxxxx> Signed-off-by: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx> --- sadump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sadump.c b/sadump.c index bc67354..6f87a23 100644 --- a/sadump.c +++ b/sadump.c @@ -715,7 +715,7 @@ is_set_bit(char *bitmap, uint64_t pfn) ulong index, bit; index = pfn >> 3; - bit = pfn & 7; + bit = 7 - pfn & 7; return !!(bitmap[index] & (1UL << bit)); } -- 1.9.3
>From 51f3049f4cb4df3a7fe9dbe21eca8a194ef377dc Mon Sep 17 00:00:00 2001 From: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx> Date: Fri, 16 Oct 2015 16:19:19 +0900 Subject: [PATCH 2/2] sadump, bugfix: fix behavior of --zero_excluded option on sadump formats Currently, behavior of --zero_excluded option on sadump formats is converse: crash utility succeeds in reading pages that are filtered out by default and fails if --zero_excluded option is specified. This is due to a mistake of checking if ZERO_EXCLUDED flag. This commit corrects the check and so the wrong behavior of --zero_excluded option. Signed-off-by: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx> --- sadump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sadump.c b/sadump.c index 6f87a23..3b53ac5 100644 --- a/sadump.c +++ b/sadump.c @@ -790,7 +790,7 @@ int read_sadump(int fd, void *bufptr, int cnt, ulong addr, physaddr_t paddr) if ((pfn >= sd->max_mapnr) || !page_is_ram(pfn)) return SEEK_ERROR; if (!page_is_dumpable(pfn)) { - if (sd->flags & SADUMP_ZERO_EXCLUDED) + if (!(sd->flags & SADUMP_ZERO_EXCLUDED)) return PAGE_EXCLUDED; memset(bufptr, 0, cnt); return cnt; -- 1.9.3
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility