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
This commit is contained in:
Arvind Sankar 2020-07-28 18:57:06 -04:00 committed by Ingo Molnar
parent 451286940d
commit 8d1cf85958
1 changed files with 1 additions and 1 deletions

View File

@ -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;