Comments

KASLR may randomly chooses some positions which are located in movable
memory regions. This will break memory hotplug feature and make the
movable memory chosen by KASLR can't be removed.
The solution is limite KASLR to choose memory regions in immovable
node according to SRAT tables.
If CONFIG_MEMORY_HOTREMOVE enabled, walk through the SRAT memory
tables and store those immovable memory regions so that KASLR can get
where to choose for randomization.
If the amount of immovable memory regions is not zero, which
means the immovable memory regions existing. Calculate the intersection
between memory regions from e820/efi memory table and immovable memory
regions.
Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
---
arch/x86/boot/compressed/kaslr.c | 77 +++++++++++++++++++++++++++-----
1 file changed, 66 insertions(+), 11 deletions(-)