mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
x86/kaslr: Drop redundant variable in __process_mem_region()
region.size can be trimmed to store the portion of the region before the overlap, instead of a separate mem_vector variable. 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-9-nivedita@alum.mit.edu
This commit is contained in:
parent
ee435ee649
commit
ef7b07d59e
@ -664,11 +664,8 @@ 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) {
|
||||
struct mem_vector beginning;
|
||||
|
||||
beginning.start = region.start;
|
||||
beginning.size = overlap.start - region.start;
|
||||
process_gb_huge_pages(&beginning, image_size);
|
||||
region.size = overlap.start - region.start;
|
||||
process_gb_huge_pages(®ion, image_size);
|
||||
}
|
||||
|
||||
/* Return if overlap extends to or past end of region. */
|
||||
|
Loading…
Reference in New Issue
Block a user