DINO2M - System hangs with a black screen during s4 stress test
Bug #1616781 reported by
AceLan Kao
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
AceLan Kao | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
System hangs with a black screen during s4 stress test
Keyboard backlight LED is still on and adjustable, but tty1 is not avalible to switch to.
System needs to be hardware shutdown.
Steps:
1. install Ubuntu 16.04 and boot to OS
2. run s4 stress test (30 cycles)
3. check if the test can be completed
Expected results: Test should be able to be completed
Actual results: System hangs with a black screen
Additional information:
BIOS: 99.2.22
CPU: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4x)
GPU: 00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02)
Changed in linux (Ubuntu): | |
status: | Incomplete → In Progress |
Changed in linux (Ubuntu Xenial): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in hwe-next: | |
status: | New → Fix Released |
To post a comment you must log in.
This commit fixes this issue
commit 65c0554b73c9200 23cc8998802e508 b798113b46
Author: Rafael J. Wysocki <email address hidden>
Date: Thu Jun 30 18:11:41 2016 +0200
x86/power/64: Fix kernel text mapping corruption during image restoration
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.
The exact reason why commit ab76f7b4ab23 matters here is that it
sometimes causes a PMD of a large page to be split into PTEs
that are allocated dynamically and get corrupted during image
restoration as described above.
To fix that issue note that the code copying the last bits of the
image kernel's memory contents to the page frames occupied by them
previoulsy doesn't use the kernel text mapping, because it runs from
a special page covered by the identity mapping set up for that code
from scratch. Hence, the kernel text mapping is only needed before
that code starts to run and then it will only be used just for the
final jump to the image kernel's entry point.
Accordingly, the temporary page tables set up in swsusp_ arch_resume( )
on x86-64 need to contain the kernel text mapping too. That mapping
is only going to be used for the final jump to the image kernel, so
it only needs to cover the image kernel's entry point, because the
first thing the image kernel does after getting control back is to
switch over to its own original page tables. Moreover, the virtual
address of the image kernel's entry point in that mapping has to be
the same as the one mapped by the image kernel's page tables.
With that in mind, modify the x86-64's arch_hibernatio n_header_ save() n_header_ restore( ) routines to pass the physical
and arch_hibernatio
address of the image kernel's entry point (in addition to its virtual
address) to the boot kernel (a small piece of assembly code involved
in passing the entry point's virtual address to the image kernel is
not necessary any more after that, so drop it). Update RESTORE_MAGIC
too to reflect the image header format change.
Next, in set_up_ temporary_ mappings( ), use the physical and virtual
addresses of the image kernel's entry point passed in the image
header to set up a minimum kernel text mapping (using memory pages
that won't be overwritten by the image kernel's memory contents) that
will map those addresses to each other as appropriate.
This makes the concern about the possible corruption of the original...