diff options
author | Arvind Sankar <nivedita@alum.mit.edu> | 2020-07-29 01:57:06 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-07-31 12:08:17 +0300 |
commit | 8d1cf8595860f4807f4ff1f8f1fc53e7576e0d71 (patch) | |
tree | aea6bdd9a10128f3fb102d05cdc615fe3f03d25a /arch/x86/boot | |
parent | 451286940d95778e83fa7f97006316d995b4c4a8 (diff) | |
download | linux-8d1cf8595860f4807f4ff1f8f1fc53e7576e0d71.tar.xz |
x86/kaslr: Fix off-by-one error in __process_mem_region()
In case of an overlap, the beginning of the region should be used even
if it is exactly image_size, not just strictly larger.
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-6-nivedita@alum.mit.edu
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/compressed/kaslr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index da45e66cb6e4..848346fc0dbb 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -669,7 +669,7 @@ static void __process_mem_region(struct mem_vector *entry, } /* Store beginning of region if holds at least image_size. */ - if (overlap.start > region.start + image_size) { + if (overlap.start >= region.start + image_size) { struct mem_vector beginning; beginning.start = region.start; |