]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7b03a1fc269bc6a4415eef8408921864646b3067
treecc8b1ee8757cc536c817a213d1dbc1b463bde86c
parenta1ce6fed2df0df10953d0c6046fcd4a0734209e3
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