Skip to content
Commit 62822e2e authored by Thomas Garnier's avatar Thomas Garnier Committed by Rafael J. Wysocki
Browse files

PM / hibernate: Restore processor state before using per-CPU variables



Restore the processor state before calling any other functions to
ensure per-CPU variables can be used with KASLR memory randomization.

Tracing functions use per-CPU variables (GS based on x86) and one was
called just before restoring the processor state fully. It resulted
in a double fault when both the tracing & the exception handler
functions tried to use a per-CPU variable.

Fixes: bb3632c6 (PM / sleep: trace events for suspend/resume)
Reported-and-tested-by: default avatarBorislav Petkov <bp@suse.de>
Reported-by: default avatarJiri Kosina <jikos@kernel.org>
Tested-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Tested-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarThomas Garnier <thgarnie@google.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e4630fdd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment