Re: [PATCH v5] x86/power/64: Fix kernel text mapping corruption during image restoration
From: Borislav Petkov
Date: Thu Jun 30 2016 - 13:02:45 EST
On Thu, Jun 30, 2016 at 06:11:41PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> Logan Gunthorpe reports that hibernation stopped working reliably for
> him after commit ab76f7b4ab23 (x86/mm: Set NX on gap between __ex_table
> and rodata).
>
> That turns out to be a consequence of a long-standing issue with the
> 64-bit image restoration code on x86, which is that the temporary
> page tables set up by it to avoid page tables corruption when the
> last bits of the image kernel's memory contents are copied into
> their original page frames re-use the boot kernel's text mapping,
> but that mapping may very well get corrupted just like any other
> part of the page tables. Of course, if that happens, the final
> jump to the image kernel's entry point will go to nowhere.
...
> Boris, please test it on the machine where we saw memory corruption with
> the previous versions if poss.
Looks good. 5 runs passed without a hiccup.
Reported-and-tested-by: Borislav Petkov <bp@xxxxxxx>
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.