Commit 65fe935d authored by Kees Cook's avatar Kees Cook Committed by Ingo Molnar

x86/KASLR, x86/power: Remove x86 hibernation restrictions

With the following fix:

  70595b479ce1 ("x86/power/64: Fix crash whan the hibernation code passes control to the image kernel")

... there is no longer a problem with hibernation resuming a
KASLR-booted kernel image, so remove the restriction.
Signed-off-by: default avatarKees Cook <>
Cc: Andy Lutomirski <>
Cc: Baoquan He <>
Cc: Borislav Petkov <>
Cc: Brian Gerst <>
Cc: Denys Vlasenko <>
Cc: H. Peter Anvin <>
Cc: Jonathan Corbet <>
Cc: Len Brown <>
Cc: Linus Torvalds <>
Cc: Linux PM list <>
Cc: Logan Gunthorpe <>
Cc: Pavel Machek <>
Cc: Peter Zijlstra <>
Cc: Stephen Smalley <>
Cc: Thomas Gleixner <>
Cc: Yinghai Lu <>
Link: default avatarIngo Molnar <>
parent 8d950d2f
......@@ -1803,12 +1803,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
js= [HW,JOY] Analog joystick
See Documentation/input/joystick.txt.
kaslr/nokaslr [X86]
Enable/disable kernel and module base offset ASLR
(Address Space Layout Randomization) if built into
the kernel. When CONFIG_HIBERNATION is selected,
kASLR is disabled by default. When kASLR is enabled,
hibernation will be disabled.
nokaslr [KNL]
When CONFIG_RANDOMIZE_BASE is set, this disables
kernel and module base offset ASLR (Address Space
Layout Randomization).
keepinitrd [HW,ARM]
......@@ -471,17 +471,10 @@ unsigned char *choose_random_location(unsigned long input,
unsigned long choice = output;
unsigned long random_addr;
if (!cmdline_find_option_bool("kaslr")) {
warn("KASLR disabled: 'kaslr' not on cmdline (hibernation selected).");
goto out;
if (cmdline_find_option_bool("nokaslr")) {
warn("KASLR disabled: 'nokaslr' on cmdline.");
goto out;
boot_params->hdr.loadflags |= KASLR_FLAG;
......@@ -1154,11 +1154,6 @@ static int __init nohibernate_setup(char *str)
return 1;
static int __init kaslr_nohibernate_setup(char *str)
return nohibernate_setup(str);
static int __init page_poison_nohibernate_setup(char *str)
......@@ -1182,5 +1177,4 @@ __setup("hibernate=", hibernate_setup);
__setup("resumewait", resumewait_setup);
__setup("resumedelay=", resumedelay_setup);
__setup("nohibernate", nohibernate_setup);
__setup("kaslr", kaslr_nohibernate_setup);
__setup("page_poison=", page_poison_nohibernate_setup);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment