Re: [PATCH] x86: fix kdump, cleanup aborted E820_PRAM max_pfn manipulation
From: Jeff Moyer
Date: Wed Sep 21 2016 - 16:22:38 EST
Dan Williams <dan.j.williams@xxxxxxxxx> writes:
> In commit ec776ef6bbe1 "x86/mm: Add support for the non-standard
> protected e820 type" Christoph references the original patch I wrote
> implementing pmem support. The intent of the 'max_pfn' changes in that
> commit were to enable persistent memory ranges to be covered by the
> struct page memmap by default. However, that approach was abandoned
> when Christoph ported the patches [1], and that functionality has since
> been replaced by devm_memremap_pages().
>
> In the meantime, this max_pfn manipulation is confusing kdump [2] that
> assumes that everything covered by the max_pfn is "System RAM". This
> results in kdump hanging or crashing.
That was my assumption, I'm not certain that the kdump code is assuming
the pmem region is usable as RAM. The end result is a hung kdump
kernel.
> [1]: https://lists.01.org/pipermail/linux-nvdimm/2015-March/000348.html
> [2]: https://bugzilla.redhat.com/show_bug.cgi?id=1351098
>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Boaz Harrosh <boaz@xxxxxxxxxxxxx>
> Cc: H. Peter Anvin <hpa@xxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Reported-by: Zhang Yi <yizhan@xxxxxxxxxx>
> Reported-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
> Tested-by: Zhang Yi <yizhan@xxxxxxxxxx>
I actually did the testing. You can leave that line as is, though, as
I'm sure Yi will also test it. :)
> Fixes: ec776ef6bbe1 ("x86/mm: Add support for the non-standard protected e820 type")
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
Thanks, Dan!
-Jeff