There is a bug that kaslr may randomly choose 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. So dig SRAT table from ACPI tables to get memory information.
Imitate the ACPI code of pars
Copy kstrtoull() to 'compressed' directory so that
we can use it to change the address in cmdline from
string to unsigned long long.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/misc.c | 88 +
arch/x86/boot/compressed/misc.h | 4 ++
2 files changed, 92 in
If CONFIG_MEMORY_HOTREMOVE enabled and the amount of immovable
memory regions is not zero. Calculate the intersection between memory
regions from e820/efi memory table and immovable memory regions.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 72 +++-
Dig out SRAT table from RSDP, and then walk all memory to find
the immovable memory regions, and fill in the immovable_mem[].
So that we can use it to select memory for KASLR.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/Makefile | 4 +
arch/x86/boot/compressed/acpitb.c | 129 +
If CONFIG_MEMORY_HOTREMOVE enabled, walk through the acpi srat memory
tables and store those immovable memory regions so that kaslr can get
where to choose for randomization.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arc
If KEXEC write the RSDP pointer to cmdline, parse the cmdline
and use it.
Imitate from early_param of "acpi_rsdp".
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/acpitb.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/arch/x86/boot/compressed/acpitb.c
b/arch/
Imitate acpi_find_root_pointer() and acpi_tb_scan_memory_for_rsdp()
to search RSDP table pointer in memory. This function only works
when RSDP not found in EFI table.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/acpitb.c | 106 ++
1 file changed, 106 insertion
***Background:
People reported that 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.
***Solutions:
There should be a method to limit kaslr to choosing immovabl
Introduce a new function cmdline_find_option_arg() to detect whether
option is in command line and the value is arg.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/cmdline.c | 15 +++
arch/x86/boot/compressed/misc.h| 1 +
2 files changed, 16 insertions(+)
diff --git a/arc
On 10/17/18 at 06:20pm, Chao Fan wrote:
> In the earliest time, I tried to dig ACPI tabls to solve this problem.
> But I didn't splite the code in 'compressed/' and ACPI code, so the patch
> is hard to follow so refused by community.
> Somebody suggest to add a kernel parameter to specify the
> imm
On 10/17/18 at 06:20pm, Chao Fan wrote:
> +bool cmdline_find_option_arg(const char *option, const char *arg, int
> argsize)
> +{
> + char *buffer = malloc(argsize+1);
> + bool find = false;
> + int ret;
> +
> + ret = cmdline_find_option(option, buffer, argsize+1);
> + if (ret =
On 10/17/18 at 06:20pm, Chao Fan wrote:
> Copy kstrtoull() to 'compressed' directory so that
> we can use it to change the address in cmdline from
> string to unsigned long long.
So you don't like simple_strtoull() in arch/x86/boot/string.c which has
been used in boot/compressed/kaslr.c . Why? Are
On 10/17/18 at 06:20pm, Chao Fan wrote:
> If CONFIG_MEMORY_HOTREMOVE enabled and the amount of immovable
> memory regions is not zero. Calculate the intersection between memory
This if conditional adverbial clauses is not an complete sentence.
> regions from e820/efi memory table and immovable me
On 10/17/18 at 06:20pm, Chao Fan wrote:
> If CONFIG_MEMORY_HOTREMOVE enabled, walk through the acpi srat memory
> tables and store those immovable memory regions so that kaslr can get
> where to choose for randomization.
This patch only adds invocation of get_immovable_mem() inside
mem_avoid_init(
On 10/17/18 at 06:20pm, Chao Fan wrote:
> There is a bug that kaslr may randomly choose 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. So dig SRAT table from ACPI tables to get me
On Thu, Oct 18, 2018 at 11:59:58AM +0800, Baoquan He wrote:
>On 10/17/18 at 06:20pm, Chao Fan wrote:
>> In the earliest time, I tried to dig ACPI tabls to solve this problem.
>> But I didn't splite the code in 'compressed/' and ACPI code, so the patch
>> is hard to follow so refused by community.
>
On Thu, Oct 18, 2018 at 12:03:38PM +0800, Baoquan He wrote:
>On 10/17/18 at 06:20pm, Chao Fan wrote:
>> Copy kstrtoull() to 'compressed' directory so that
>> we can use it to change the address in cmdline from
>> string to unsigned long long.
>
>So you don't like simple_strtoull() in arch/x86/boot/
On Thu, Oct 18, 2018 at 12:35:39PM +0800, Baoquan He wrote:
>On 10/17/18 at 06:20pm, Chao Fan wrote:
>> There is a bug that kaslr may randomly choose some positions
>> which are located in movable memory regions. This will break memory
>> hotplug feature and make the movable memory chosen by KASLR
On 10/18/18 at 01:54pm, Chao Fan wrote:
> On Thu, Oct 18, 2018 at 12:35:39PM +0800, Baoquan He wrote:
> >On 10/17/18 at 06:20pm, Chao Fan wrote:
> >> There is a bug that kaslr may randomly choose some positions
> >> which are located in movable memory regions. This will break memory
> >> hotplug fe
On Thu, Oct 18, 2018 at 12:23:20PM +0800, Baoquan He wrote:
>On 10/17/18 at 06:20pm, Chao Fan wrote:
>> If CONFIG_MEMORY_HOTREMOVE enabled, walk through the acpi srat memory
>> tables and store those immovable memory regions so that kaslr can get
>> where to choose for randomization.
>
>This patch
On 10/18/18 at 01:51pm, Chao Fan wrote:
> On Thu, Oct 18, 2018 at 12:03:38PM +0800, Baoquan He wrote:
> >On 10/17/18 at 06:20pm, Chao Fan wrote:
> >> Copy kstrtoull() to 'compressed' directory so that
> >> we can use it to change the address in cmdline from
> >> string to unsigned long long.
> >
>
On Thu, Oct 18, 2018 at 02:01:28PM +0800, Baoquan He wrote:
>On 10/18/18 at 01:51pm, Chao Fan wrote:
>> On Thu, Oct 18, 2018 at 12:03:38PM +0800, Baoquan He wrote:
>> >On 10/17/18 at 06:20pm, Chao Fan wrote:
>> >> Copy kstrtoull() to 'compressed' directory so that
>> >> we can use it to change the
On Thu, Oct 18, 2018 at 01:56:44PM +0800, Baoquan He wrote:
>On 10/18/18 at 01:54pm, Chao Fan wrote:
>> On Thu, Oct 18, 2018 at 12:35:39PM +0800, Baoquan He wrote:
>> >On 10/17/18 at 06:20pm, Chao Fan wrote:
>> >> There is a bug that kaslr may randomly choose some positions
>> >> which are located
On Wed, Oct 17, 2018 at 06:20:10PM +0800, Chao Fan wrote:
>Dig out SRAT table from RSDP, and then walk all memory to find
>the immovable memory regions, and fill in the immovable_mem[].
>So that we can use it to select memory for KASLR.
>
>Signed-off-by: Chao Fan
>---
> arch/x86/boot/compressed/Ma
On Thu, Oct 18, 2018 at 12:01:20PM +0800, Baoquan He wrote:
>On 10/17/18 at 06:20pm, Chao Fan wrote:
>> +bool cmdline_find_option_arg(const char *option, const char *arg, int
>> argsize)
>> +{
>> +char *buffer = malloc(argsize+1);
>> +bool find = false;
>> +int ret;
>> +
>> +ret =
25 matches
Mail list logo