diff options
Diffstat (limited to 'arch/x86/boot/compressed/aslr.c')
-rw-r--r-- | arch/x86/boot/compressed/aslr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index bb1376381985..d7b1f655b3ef 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c | |||
@@ -295,7 +295,8 @@ static unsigned long find_random_addr(unsigned long minimum, | |||
295 | return slots_fetch_random(); | 295 | return slots_fetch_random(); |
296 | } | 296 | } |
297 | 297 | ||
298 | unsigned char *choose_kernel_location(unsigned char *input, | 298 | unsigned char *choose_kernel_location(struct boot_params *boot_params, |
299 | unsigned char *input, | ||
299 | unsigned long input_size, | 300 | unsigned long input_size, |
300 | unsigned char *output, | 301 | unsigned char *output, |
301 | unsigned long output_size) | 302 | unsigned long output_size) |
@@ -315,6 +316,8 @@ unsigned char *choose_kernel_location(unsigned char *input, | |||
315 | } | 316 | } |
316 | #endif | 317 | #endif |
317 | 318 | ||
319 | boot_params->hdr.loadflags |= KASLR_FLAG; | ||
320 | |||
318 | /* Record the various known unsafe memory ranges. */ | 321 | /* Record the various known unsafe memory ranges. */ |
319 | mem_avoid_init((unsigned long)input, input_size, | 322 | mem_avoid_init((unsigned long)input, input_size, |
320 | (unsigned long)output, output_size); | 323 | (unsigned long)output, output_size); |