x86/kaslr: Drop some redundant checks from __process_mem_region()
authorArvind Sankar <nivedita@alum.mit.edu>
Tue, 28 Jul 2020 22:57:10 +0000 (18:57 -0400)
committerIngo Molnar <mingo@kernel.org>
Fri, 31 Jul 2020 09:08:17 +0000 (11:08 +0200)
commitbf457be1548eee6d106daf9604e029b36fed2b11
treecc8b1ee8757cc536c817a213d1dbc1b463bde86c
parentef7b07d59e2f18042622cecde0c7a89b60f33a89
x86/kaslr: Drop some redundant checks from __process_mem_region()

Clip the start and end of the region to minimum and mem_limit prior to
the loop. region.start can only increase during the loop, so raising it
to minimum before the loop is enough.

A region that becomes empty due to this will get checked in
the first iteration of the loop.

Drop the check for overlap extending beyond the end of the region. This
will get checked in the next loop iteration anyway.

Rename end to region_end for symmetry with region.start.

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-10-nivedita@alum.mit.edu
arch/x86/boot/compressed/kaslr.c