Skip to contentSkip to conversation

Get acpi table to limit memory scope chosen by KASLR to home SB when "movable_node" is specified

POC Chao Fan 2 participants 3 messages Aug 3, 2017 ACPI

lore
Share & tools
lore

Chao Fan

author
#0 lore raw

Hi all,

Here is an issue about movable_node and KASLR.
Currently, KASLR works well with "mem=", by which we can limit the scope of memory chosen by KASLR. But if we use "movable_node" independently without "mem=", we don't know the scope of memory in the home SB, which will cause the memory of hotplug SB may be chosen by KASLR.
To solve this problem, I want to do this job:
If "movable_node" is specified, try to get the acpi table and find the scope of memory in home SB, then set "mem_limit".

The order of getting table is:
boot_params
\-systab
\-efi tables
\-rsdp
\-rsdt or xsdt
\-acpi root table list
\-acpi srat mem affinity

I am not sure if it's OK for community.
If there are any problems, please let me know.
Any comments will be welcome.

Thanks,
Chao Fan

#1 lore raw

Cc ACPI maintainers and mail list

Quoted 29 lines · Chao Fan

Hi all,

Here is an issue about movable_node and KASLR.
Currently, KASLR works well with "mem=", by which we can limit the scope of memory chosen by KASLR. But if we use "movable_node" independently without "mem=", we don't know the scope of memory in the home SB, which will cause the memory of hotplug SB may be chosen by KASLR.
To solve this problem, I want to do this job:
If "movable_node" is specified, try to get the acpi table and find the scope of memory in home SB, then set "mem_limit".

The order of getting table is:
boot_params
\-systab
\-efi tables
\-rsdp
\-rsdt or xsdt
\-acpi root table list
\-acpi srat mem affinity

I am not sure if it's OK for community.
If there are any problems, please let me know.
Any comments will be welcome.

Thanks,
Chao Fan

author
#2 lore raw
Quoted 1 line · Dou Liyang

Cc ACPI maintainers and mail list

So many thanks.

Quoted 13 lines
Quoted 11 lines · Chao Fan

Hi all,

Here is an issue about movable_node and KASLR.
Currently, KASLR works well with "mem=", by which we can limit the scope of memory chosen by KASLR. But if we use "movable_node" independently without "mem=", we don't know the scope of memory in the home SB, which will cause the memory of hotplug SB may be chosen by KASLR.
To solve this problem, I want to do this job:
If "movable_node" is specified, try to get the acpi table and find the scope of memory in home SB, then set "mem_limit".

Quoted 9 lines
Quoted 9 lines

The order of getting table is:
boot_params
\-systab
\-efi tables
\-rsdp
\-rsdt or xsdt
\-acpi root table list
\-acpi srat mem affinity

I am not sure if it's good to do this job in this period, so I want to get the feedback of community.

Thanks,
Chao Fan

Quoted 9 lines
Quoted 9 lines

I am not sure if it's OK for community.
If there are any problems, please let me know.
Any comments will be welcome.

Thanks,
Chao Fan