diff options
author | Arvind Sankar <nivedita@alum.mit.edu> | 2020-07-29 01:57:18 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-07-31 12:08:17 +0300 |
commit | 4268b4da572f8bde8bc2f3243927ff5795687a6f (patch) | |
tree | 5f161e212f407c84af65729408eb7f2957343fd9 /arch/x86/boot/compressed/kaslr.c | |
parent | eb38be6db516fb72ccf7282628b545a185b3bc7a (diff) | |
download | linux-4268b4da572f8bde8bc2f3243927ff5795687a6f.tar.xz |
x86/kaslr: Small cleanup of find_random_phys_addr()
Just a trivial rearrangement to do all the processing together, and only
have one call to slots_fetch_random() in the source.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200728225722.67457-18-nivedita@alum.mit.edu
Diffstat (limited to 'arch/x86/boot/compressed/kaslr.c')
-rw-r--r-- | arch/x86/boot/compressed/kaslr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index ce34a05ccdc4..ecdf33da2a97 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -813,10 +813,9 @@ static unsigned long find_random_phys_addr(unsigned long minimum, return 0; } - if (process_efi_entries(minimum, image_size)) - return slots_fetch_random(); + if (!process_efi_entries(minimum, image_size)) + process_e820_entries(minimum, image_size); - process_e820_entries(minimum, image_size); return slots_fetch_random(); } |