27;s suggestion:
- Change names of several functions.
- Add a new parameter "immovable_mem" instead of extending mvoable_node
- Use the clamp to calculate the memory intersecting, which makes
logical more clear.
- Disable memory mirror if movable_node specified
v1->v2:
Follow Dou Liyan
On Fri, Jan 19, 2018 at 11:53:31AM +0800, Baoquan He wrote:
>On 01/19/18 at 11:36am, Chao Fan wrote:
>> Signed-off-by: Chao Fan
>> ---
>> Documentation/admin-guide/kernel-parameters.txt | 10 ++
>> 1 file changed, 10 insertions(+)
>>
>> diff -
Cc: linux-...@vger.kernel.org
Cc: Jonathan Corbet
Cc: Randy Dunlap
Signed-off-by: Chao Fan
---
Documentation/admin-guide/kernel-parameters.txt | 10 ++
1 file changed, 10 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation/admin-guide/kernel
Signed-off-by: Chao Fan
---
Documentation/admin-guide/kernel-parameters.txt | 10 ++
1 file changed, 10 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation/admin-guide/kernel-parameters.txt
index e2de7c006a74..28a879f62560 100644
--- a
In kernel code, if movable_node specified, it will skip the mirror
feature. So we should also skip mirror feature in KASLR.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot
Since only 'movable_node' specified without 'kaslr_mem=' may break
memory hotplug, so reconmmend users using 'kaslr_mem=' when
'movable_node' specified.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 10 ++
1 file changed, 10 i
On Wed, Jan 17, 2018 at 10:02:48PM +0800, Baoquan He wrote:
>On 01/17/18 at 06:53pm, Chao Fan wrote:
>> Since only 'movable_node' specified without 'kaslr_mem=' may break
>> memory hotplug, so reconmmend users using 'kaslr_mem=' when
>> '
On Wed, Jan 17, 2018 at 10:03:54PM +0800, Baoquan He wrote:
>On 01/17/18 at 06:53pm, Chao Fan wrote:
>> In kernel code, if movable_node specified, it will skip the mirror
>> feature. So we should also skip mirror feature in KASLR.
>>
>> Signed-off-by: Chao Fan
>>
On Wed, Jan 17, 2018 at 12:32:35PM -0500, Luiz Capitulino wrote:
>On Wed, 17 Jan 2018 18:53:46 +0800
>Chao Fan wrote:
>
>> ***Background:
>> People reported that kaslr may randomly chooses some positions
>> which are located in movable memory regions. This will brea
Since only 'movable_node' specified without 'kaslr_mem=' may break
memory hotplug, so reconmmend users using 'kaslr_mem=' when
'movable_node' specified..
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 10 ++
1 file changed, 10 i
In kernel code, if movable_node specified, it will skip the mirror
feature. So we should also skip mirror feature in KASLR.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot
ting, which makes
logical more clear.
- Disable memory mirror if movable_node specified
v1->v2:
Follow Dou Liyang's suggestion:
- Add the parse for movable_node=nn[KMG] without @ss[KMG]
- Fix the bug for more than one "movable_node=" specified
- Drop useless variables
gion.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 64 +---
1 file changed, 53 insertions(+), 11 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index b21741135673..b200a7ceafc1 100644
--- a/arch
Signed-off-by: Chao Fan
---
Documentation/admin-guide/kernel-parameters.txt | 10 ++
1 file changed, 10 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation/admin-guide/kernel-parameters.txt
index e2de7c006a74..f6d5adde1a73 100644
--- a
regions, this will make memory hotplug fail.
With the help of 'kaslr_mem=', limit kernel in those immovable regions
specified.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 73 ++--
1 file changed, 70 insertions(+), 3 deletions(-)
di
On Tue, Jan 16, 2018 at 11:34:23AM -0500, Luiz Capitulino wrote:
>On Tue, 16 Jan 2018 08:43:20 +0800
>Baoquan He wrote:
>
>> On 01/15/18 at 08:49pm, Chao Fan wrote:
>> > Hi Luiz,
>> >
>> > I don't know if this patch is OK for you.
>> > O
On Tue, Jan 16, 2018 at 08:43:20AM +0800, Baoquan He wrote:
>On 01/15/18 at 08:49pm, Chao Fan wrote:
>> Hi Luiz,
>>
>> I don't know if this patch is OK for you.
>> Of coure you can only use kaslr_mem=nn@ss to solve the 1G huge page
>> issue. Because we know
On Mon, Jan 15, 2018 at 02:40:35PM -0800, Randy Dunlap wrote:
>On 01/15/2018 04:40 AM, Chao Fan wrote:
>> In current code, kaslr only has a method to avoid some memory regions,
>> but no method to specify the regions for kaslr to extract. So kaslr
>> may choose the wrong posi
ption for the document.
v4->v5:
- Change the problem reported by LKP
Follow Dou's suggestion:
- Also return if match "movable_node" when parsing kernel commandline
in handle_mem_filter without define CONFIG_MEMORY_HOTPLUG
v5->v6:
- Add the last patch to save the avoid m
In kernel code, if movable_node specified, it will skip the mirror
feature. So we should also skip mirror feature in kaslr.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot
t;handle_mem_filter", since
it will not only handle memmap parameter now.
Multiple regions can be specified, comma delimited.
Considering the usage of memory, only support for 4 regions.
4 regions contains 2 nodes at least, enough for kernel to extract.
Signed-off-by: Chao Fan
---
ar
period.
It can help users to avoid more memory regions, not only the 1G huge
huge page issue.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 56 +++-
1 file changed, 50 insertions(+), 6 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr.c b
On Mon, Jan 15, 2018 at 08:40:12PM +0800, Chao Fan wrote:
>In current code, kaslr only has a method to avoid some memory regions,
>but no method to specify the regions for kaslr to extract. So kaslr
>may choose the wrong position sometimes, which will cause some other
>features fail.
e too slow and is not good
for the randomness.
So as Kess said, I put the regions suitable for 1G huge page to
mem_avoid, you can use kaslr_mem=1G!1G to solve the problem in your
email.
Thanks,
Chao Fan
On Mon, Jan 15, 2018 at 08:40:16PM +0800, Chao Fan wrote:
>In current code, kaslr choose
If there is no kaslr_mem= region specified, use region directely.
Otherwise, calculate the intersecting between efi or e820 memmap entry
and kaslr_mem.
Rename process_mem_region to slots_count to match
slots_fetch_random, and rename new function sa process_mem_region.
Signed-off-by: Chao Fan
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index b071f6edd7b2..38816d3f8865 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot
On Sat, Jan 13, 2018 at 12:02:26PM +0800, Baoquan He wrote:
>On 01/12/18 at 01:52pm, Luiz Capitulino wrote:
>> On Fri, 12 Jan 2018 10:47:53 +0800
>> Chao Fan wrote:
>>
>> > On Fri, Jan 12, 2018 at 10:31:52AM +0800, Baoquan He wrote:
>> > >On 01/11/18 at
;>
>> Any ranges like that that need to be avoided should be known at build
>> time, so they should simply be added to the mem_avoid list that is
>> already present in the KASLR code...
>
>Seems KASLR doesn't have an solution which allow user to specify avoided
>ran
s case, what range do we need to avoid? Only [1G, 2G]?
>
>Any ranges like that that need to be avoided should be known at build
>time, so they should simply be added to the mem_avoid list that is
>already present in the KASLR code...
>
Hi Kees,
So this issue can be figured out in a independent patch.
And does this patch have any problems? If so, please tell me, I will try
my best to improve it.
Thanks,
Chao Fan
>-Kees
>
>--
>Kees Cook
>Pixel Security
>
>
On Mon, Jan 08, 2018 at 09:39:54AM -0500, Luiz Capitulino wrote:
>On Fri, 5 Jan 2018 10:58:11 +0800
>Chao Fan wrote:
>
>> On Thu, Jan 04, 2018 at 06:30:57PM +0800, Baoquan He wrote:
>> >On 01/04/18 at 04:02pm, Chao Fan wrote:
>> >> In current code, kaslr may
On Thu, Jan 04, 2018 at 06:30:57PM +0800, Baoquan He wrote:
>On 01/04/18 at 04:02pm, Chao Fan wrote:
>> In current code, kaslr may choose the memory region in movable
>> nodes to extract kernel, which will make the nodes can't be hot-removed.
>> To solve it, we can sp
Add the document for the change of new parameter
immovable_mem=nn[KMG][@ss[KMG]].
Signed-off-by: Chao Fan
---
Documentation/admin-guide/kernel-parameters.txt | 10 ++
1 file changed, 10 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation/admin
In kernel code, if movable_node specified, it will skip the mirror
feature. So we should also skip mirror feature in kaslr.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot
slots_count to match
slots_fetch_random, and rename new function sa process_mem_region.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 67 +---
1 file changed, 56 insertions(+), 11 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr.c b
uot; without "immovable_mem=",
disable KASLR.
Multiple regions can be specified, comma delimited.
Considering the usage of memory, only support for 4 regions.
4 regions contains 2 nodes at least, enough for kernel to extract.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 1
ovable_mem specified
Follow Randy's suggestion:
- Change the mistake and add detailed description for the document.
v4->v5:
- Change the problem reported by LKP
Follow Dou's suggestion:
- Also return if match "movable_node" when parsing kernel commandline
in handle_mem_filte
specify the regions based on node. The memory region
in a NUMA node just contain one or two acpi_srat_mem_affinity in acpi.
But the memblock may have an intersection with two NUMA nodes.
So the data in acpi table is exactly suitable for this issue.
So I write the patch like this.
Thanks,
Chao
On Wed, Dec 27, 2017 at 01:47:26PM +0100, Greg KH wrote:
>On Wed, Dec 27, 2017 at 08:30:12PM +0800, Chao Fan wrote:
>> In sometimes users specify the memory region in immovable node in
>> some kernel commandline, such as "kernel_core" or the "immovable_mem="
@13a00,1f40@15940
Any comments will be welcome.
Thanks,
Chao Fan
On Wed, Dec 27, 2017 at 08:30:12PM +0800, Chao Fan wrote:
>In sometimes users specify the memory region in immovable node in
>some kernel commandline, such as "kernel_core" or the "immovable_mem="
&g
s: "nn@ss,nn@ss,...". "nn" means the size of memory
region, "ss" means the start position of this region.
Signed-off-by: Chao Fan
---
drivers/base/memory.c | 50 ++
1 file changed, 50 insertions(+)
diff --git a/drivers/b
slots_count to match
slots_fetch_random, and rename new function sa process_mem_region.
Signed-off-by: Chao Fan
---
v4->v4.1:
- Move the define "int i" out of for() loop.
---
arch/x86/boot/compressed/kaslr.c | 66 +---
1 file changed, 55 inse
On Tue, Dec 12, 2017 at 08:07:02PM +0800, Chao Fan wrote:
>In current code, kaslr may choose the memory region in movable
>nodes to extract kernel, which will make the nodes can't be hot-removed.
>To solve it, we can specify the memory region in immovable node.
>Create immovable
On Tue, Dec 12, 2017 at 08:07:03PM +0800, Chao Fan wrote:
>kaslr: calculate the memory region in immovable node
>
>If there is no immovable memory region specified, use region directely.
>There are several conditons:
>1. CONFIG_MEMORY_HOTPLUG is not specified to y.
>2. imm
On Tue, Dec 12, 2017 at 08:07:02PM +0800, Chao Fan wrote:
>In current code, kaslr may choose the memory region in movable
>nodes to extract kernel, which will make the nodes can't be hot-removed.
>To solve it, we can specify the memory region in immovable node.
>Create immovable
uot; without "immovable_mem=",
disable KASLR.
Multiple regions can be specified, comma delimited.
Considering the usage of memory, only support for 4 regions.
4 regions contains 2 nodes at least, enough for kernel to extract.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 1
In kernel code, if movable_node specified, it will skip the mirror
feature. So we should also skip mirror feature in kaslr.
Cc: linux-...@vger.kernel.org
Cc: Jonathan Corbet
Cc: Randy Dunlap
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 7 +++
1 file changed, 7 insertions
Add the document for the change of new parameter
immovable_mem=nn[KMG][@ss[KMG]].
Signed-off-by: Chao Fan
---
Documentation/admin-guide/kernel-parameters.txt | 10 ++
1 file changed, 10 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation/admin
and
immovable memory.
Rename process_mem_region to slots_count to match
slots_fetch_random, and rename new function sa process_mem_region.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 65 +---
1 file changed, 54 insertions(+), 11 deletions
_count"
- Reanme the new function "process_immovable_mem" to "process_mem_region"
Follow Baoquan's suggestion:
- Fail KASLR if "movable_node" specified without "immovable_mem"
- Ajust the code place of handling mem_region directely if no
immovabl
On Thu, Dec 07, 2017 at 12:58:06PM +0800, Baoquan He wrote:
>On 12/07/17 at 12:16pm, Dou Liyang wrote:
>> Hi All,
>>
>> At 12/07/2017 11:56 AM, Chao Fan wrote:
>> > On Thu, Dec 07, 2017 at 11:09:24AM +0800, Baoquan He wrote:
>> > > On 12/07/17 at 10:53a
On Thu, Dec 07, 2017 at 11:09:24AM +0800, Baoquan He wrote:
>On 12/07/17 at 10:53am, Chao Fan wrote:
>> On Wed, Dec 06, 2017 at 05:35:57PM +0800, Baoquan He wrote:
>> >Hi Chao,
>> >
>> >Yes, now the code looks much better than the last version.
>> &g
On Wed, Dec 06, 2017 at 05:35:57PM +0800, Baoquan He wrote:
>Hi Chao,
>
>Yes, now the code looks much better than the last version.
>
>On 12/05/17 at 04:51pm, Chao Fan wrote:
>> In current code, kaslr may choose the memory region in movable
>> nodes to extract kernel
On Wed, Dec 06, 2017 at 04:11:04PM -0800, Kees Cook wrote:
>On Wed, Dec 6, 2017 at 2:02 AM, Chao Fan wrote:
>> On Wed, Dec 06, 2017 at 05:28:00PM +0800, Baoquan He wrote:
>>>On 12/05/17 at 11:40am, Kees Cook wrote:
>>>> On Tue, Dec 5, 2017 at 12:51 AM, Chao Fan
On Wed, Dec 06, 2017 at 05:28:00PM +0800, Baoquan He wrote:
>On 12/05/17 at 11:40am, Kees Cook wrote:
>> On Tue, Dec 5, 2017 at 12:51 AM, Chao Fan wrote:
>> > If there is no immovable memory region specified, go on the old code.
>> > There are several conditons:
>&
On Tue, Dec 05, 2017 at 09:36:24AM -0800, Randy Dunlap wrote:
>On 12/05/2017 12:52 AM, Chao Fan wrote:
>> Add the document for the change of new parameter
>> immovable_mem=nn[KMG]@ss[KMG].
>>
>> Cc: linux-...@vger.kernel.org
>> Cc: Jonathan C
On Tue, Dec 05, 2017 at 11:42:42AM -0800, Kees Cook wrote:
>On Tue, Dec 5, 2017 at 12:51 AM, Chao Fan wrote:
>> In current code, kaslr may choose the memory region in movable
>> nodes to extract kernel, which will make the nodes can't be hot-removed.
>> To solve it,
If there is no immovable memory region specified, go on the old code.
There are several conditons:
1. CONFIG_MEMORY_HOTPLUG is not specified to y.
2. immovable_mem= is not specified.
Otherwise, calculate the intersecting between memmap entry and
immovable memory.
Signed-off-by: Chao Fan
In kernel code, if movable_node specified, it will skip the mirror
feature. So we should also skip mirror feature in kaslr.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/boot/compressed
ap parameter now.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 80 ++--
1 file changed, 77 insertions(+), 3 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index a63fbc25ce84..0bbbaf5f6370 1
Add the document for the change of new parameter
immovable_mem=nn[KMG]@ss[KMG].
Cc: linux-...@vger.kernel.org
Cc: Jonathan Corbet
Signed-off-by: Chao Fan
---
Documentation/admin-guide/kernel-parameters.txt | 9 +
1 file changed, 9 insertions(+)
diff --git a/Documentation/admin-guide
ng, which makes
logical more clear.
- Disable memory mirror if movable_node specified
Chao Fan (4):
kaslr: add immovable_mem=nn[KMG]@ss[KMG] to specify extracting memory
kaslr: calculate the memory region in immovable node
kaslr: disable memory mirror feature when movable_node specified
document:
Commit-ID: 69550d41ff9c884c6d996fca41037974b2255852
Gitweb: https://git.kernel.org/tip/69550d41ff9c884c6d996fca41037974b2255852
Author: Chao Fan
AuthorDate: Thu, 23 Nov 2017 17:08:47 +0800
Committer: Thomas Gleixner
CommitDate: Thu, 23 Nov 2017 20:17:59 +0100
x86/boot/KASLR: Remove
There are two same variable "rc" in mem_avoid_memmap. One is in the
circulation, the other is out of the circulation. The one out will never
be used, so drop it.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
di
On Mon, Nov 13, 2017 at 05:26:24PM +0800, Baoquan He wrote:
>On 11/13/17 at 05:18pm, Chao Fan wrote:
>> On Mon, Nov 13, 2017 at 04:31:31PM +0800, Baoquan He wrote:
>> >On 11/01/17 at 07:32pm, Chao Fan wrote:
>> >> Compare the region of memmap entry and
On Mon, Nov 13, 2017 at 04:32:33PM +0800, Baoquan He wrote:
>On 11/01/17 at 07:32pm, Chao Fan wrote:
>> There are two same variable "rc" in this function. One is in the
>> circulation, the other is out of the circulation. The one out will never
>> be used, so drop it
On Mon, Nov 13, 2017 at 04:31:31PM +0800, Baoquan He wrote:
>On 11/01/17 at 07:32pm, Chao Fan wrote:
>> Compare the region of memmap entry and immovable_mem, then choose the
>> intersection to process_mem_region.
>>
>> Since the interrelationship between e820 or efi e
On Mon, Nov 13, 2017 at 04:10:41PM +0800, Baoquan He wrote:
>Hi Chao,
Hi Baoquan,
Thanks for your reply.
>
>Please think more on your patches, better to discuss with your
>colleagues and ask them to help review before your post.
>
>On 11/01/17 at 07:32pm, Chao Fan wr
On Fri, Nov 10, 2017 at 11:14:37AM +0800, Baoquan He wrote:
>On 11/10/17 at 11:03am, Chao Fan wrote:
>> On Thu, Nov 09, 2017 at 04:21:32PM +0800, Baoquan He wrote:
>> >Hi Chao,
>> >
>> >On 11/01/17 at 07:32pm, Chao Fan wrote:
>> >> Compare the regio
On Fri, Nov 10, 2017 at 11:14:37AM +0800, Baoquan He wrote:
>On 11/10/17 at 11:03am, Chao Fan wrote:
>> On Thu, Nov 09, 2017 at 04:21:32PM +0800, Baoquan He wrote:
>> >Hi Chao,
>> >
>> >On 11/01/17 at 07:32pm, Chao Fan wrote:
>> >> Compare the regio
On Thu, Nov 09, 2017 at 04:21:32PM +0800, Baoquan He wrote:
>Hi Chao,
>
>On 11/01/17 at 07:32pm, Chao Fan wrote:
>> Compare the region of memmap entry and immovable_mem, then choose the
>> intersection to process_mem_region.
>>
>> Since the interrelationship betwe
On Thu, Nov 09, 2017 at 04:21:32PM +0800, Baoquan He wrote:
>Hi Chao,
>
>On 11/01/17 at 07:32pm, Chao Fan wrote:
>> Compare the region of memmap entry and immovable_mem, then choose the
>> intersection to process_mem_region.
>>
>> Since the interrelationship betwe
memmap.
PATCH 3/4 add document.
PATCH 4/4 cleans up some little problems.
v1->v2:
Follow Dou's suggestion:
- Add the parse for movable_node=nn[KMG] without @ss[KMG]
- Fix the bug for more than one "movable_node=" specified
- Drop useless variables and use mem_vector region direct
Add the document for the change of extended movable_node=nn[KMG]@ss[KMG].
Cc: Jonathan Corbet
Cc: linux-...@vger.kernel.org
Signed-off-by: Chao Fan
---
Documentation/admin-guide/kernel-parameters.txt | 9 +
1 file changed, 9 insertions(+)
diff --git a/Documentation/admin-guide/kernel
There are two same variable "rc" in this function. One is in the
circulation, the other is out of the circulation. The one out will never
be used, so drop it.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
di
, and one entry of e820 or efi may contain the memory in
different nodes sometimes.
It may split one node or one entry to several regions.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 60 ++--
1 file changed, 52 insertions(+), 8 deletions(-)
diff
e the regions in immovable_mem, where should be
chosen by kaslr.
Multiple regions can be specified, comma delimited.
Considering the usage of memory, only support for 4 regions.
4 regions contains 2 nodes at least, enough for kernel to extract.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/ka
node, eg:
>
>"...movable_node=128G@128G movable_node=128G@256G..."
>
Yes, you are right.
I thought users will specify the regions like this:
movable_node=1G@2G,1G@4G
If users want to use
movable_node=1G@2G movable_node=1G@4G
Your suggestion is helpful and I will update it.
Thanks,
Chao Fan
>then, you will find the problem of you code.
>
>Thanks,
> dou
On Fri, Oct 20, 2017 at 11:19:48AM +0800, Dou Liyang wrote:
>Hi Chao,
>
>At 10/19/2017 06:02 PM, Chao Fan wrote:
>> There are two same variable "rc" in this function. One is in the
>> circulation, the other is out of the circulation. The one out will never
>> b
On Fri, Oct 20, 2017 at 11:37:11AM +0800, Dou Liyang wrote:
>Hi Chao,
>
>At 10/20/2017 10:53 AM, Chao Fan wrote:
>> On Fri, Oct 20, 2017 at 10:37:52AM +0800, Dou Liyang wrote:
>> > Hi Chao,
>> >
>> Hi Dou-san,
>>
>> > Cheer! I
On Fri, Oct 20, 2017 at 11:41:19AM +0800, Dou Liyang wrote:
>
>
>At 10/20/2017 11:22 AM, Chao Fan wrote:
>> On Fri, Oct 20, 2017 at 11:04:42AM +0800, Dou Liyang wrote:
>> > Hi Chao,
>> >
>> Hi Dou-san,
>>
>> > At 10/19/2017 06:02 PM, Chao Fan
On Fri, Oct 20, 2017 at 11:17:26AM +0800, Dou Liyang wrote:
>Hi Chao
>
Hi Dou-san,
>At 10/19/2017 06:02 PM, Chao Fan wrote:
>> Since the interrelationship between e820 or efi entries and memory
>> region in immovable_mem is different:
>> One memory region in one node
On Fri, Oct 20, 2017 at 11:04:42AM +0800, Dou Liyang wrote:
>Hi Chao,
>
Hi Dou-san,
>At 10/19/2017 06:02 PM, Chao Fan wrote:
>> Extend the movable_node to movable_node=nn[KMG]@ss[KMG].
>> Since in current code, kaslr may choose the memory region in hot-pluggable
>> no
On Fri, Oct 20, 2017 at 10:37:52AM +0800, Dou Liyang wrote:
>Hi Chao,
>
Hi Dou-san,
>Cheer! I have some concerns below.
Thanks for your reply.
>
>At 10/19/2017 06:02 PM, Chao Fan wrote:
>> Here is a problem:
>> Here is a machine with several NUMA nodes and som
as a region to
process_mem_region. It may split one node or one entry to several regions.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 72
1 file changed, 58 insertions(+), 14 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr.c b
usage of memory, only support for 4 regions.
4 regions contains 2 nodes at least, and is enough for kernel to
extract.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 63 +++-
1 file changed, 62 insertions(+), 1 deletion(-)
diff --git a/arch/x86
There are two same variable "rc" in this function. One is in the
circulation, the other is out of the circulation. The one out will never
be used, so drop it.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
di
tor, the usage
of memory here is not too big.
PATCH 1/4 parse the extended movable_node=nn[KMG]@ss[KMG], then
store the memory regions.
PATCH 2/4 selects the memory region in immovable node when process
memmap.
PATCH 3/4 is the change of document.
PATCH 4/4 cleans up
Add the document for the change of extended movable_node=nn[KMG]@ss[KMG].
Cc: Jonathan Corbet
Cc: linux-...@vger.kernel.org
Signed-off-by: Chao Fan
---
Documentation/admin-guide/kernel-parameters.txt | 9 +
1 file changed, 9 insertions(+)
diff --git a/Documentation/admin-guide/kernel
On Wed, Oct 11, 2017 at 04:42:15PM +0800, Baoquan He wrote:
>Hi dear Fan San,
Hi dear Uncle Bao,
>
>On 10/11/17 at 04:23pm, Chao Fan wrote:
>> On Wed, Oct 11, 2017 at 03:55:13PM +0800, Baoquan He wrote:
>> >Hi Fan San,
>> >> 1. Get and parse the srat table be
On Wed, Oct 11, 2017 at 03:55:13PM +0800, Baoquan He wrote:
>Hi Fan San,
>
>On 10/11/17 at 10:28am, Chao Fan wrote:
>> Hi all,
>>
>> Here is a problem:
>> Here is a machine with several NUMA nodes and some of them are hot-pluggable,
>> It's not good for
When srat table is parsed in acpi_parse_memory_affinity, fill the value
and user can get and use them.
If anyone has a better method, please let me know.
Any comments will be welcome.
Thanks,
Chao Fan
, including the memory location and length. But I have no idea
that if it's elegant leaving it for users to fill the parameter.
BTW, it may be like this: "movable_node=xxx@start,xxx@start,..."
And I was also wondering if anyone has a better solution.
Thanks,
Chao Fan
>
>Thank
On Mon, Sep 04, 2017 at 10:26:19AM +0800, Baoquan He wrote:
>On 09/04/17 at 12:55am, Rafael J. Wysocki wrote:
>> On Sunday, September 3, 2017 4:31:23 PM CEST Chao Fan wrote:
>> > KASLR should choose the memory region of immovable node to extract kernel.
>> > So get AC
On Mon, Sep 04, 2017 at 12:55:00AM +0200, Rafael J. Wysocki wrote:
>On Sunday, September 3, 2017 4:31:23 PM CEST Chao Fan wrote:
>> KASLR should choose the memory region of immovable node to extract kernel.
>> So get ACPI SRAT table and store the memory region of movable node which
KASLR should choose the memory region of immovable node to extract kernel.
So get ACPI SRAT table and store the memory region of movable node which
kaslr shold avoid.
Signed-off-by: Chao Fan
---
v2: Add the support for bios
---
arch/x86/boot/compressed/kaslr.c | 346
On Wed, Aug 23, 2017 at 03:43:33AM +, Zheng, Lv wrote:
>Hi,
>
>> From: linux-acpi-ow...@vger.kernel.org
>> [mailto:linux-acpi-ow...@vger.kernel.org] On Behalf Of Chao Fan
>> Subject: [PATCH] actbl1.h: use tab instead of seven spaces as the indentation
>>
>>
The indentation of these two lines is seven spaces, but not tab.
So fix it.
Signed-off-by: Chao Fan
---
include/acpi/actbl1.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index b4ce55c008b0..d13e5b416a7e 100644
--- a
a better method to handle the movable memory,
please tell me.
Thanks,
Chao Fan
On Fri, Aug 18, 2017 at 04:58:20PM +0800, Chao Fan wrote:
>KASLR should choose the memory region of immovable node to extract kernel.
>So get ACPI SRAT table and store the memory region of movable node which
KASLR should choose the memory region of immovable node to extract kernel.
So get ACPI SRAT table and store the memory region of movable node which
kaslr shold avoid.
Signed-off-by: Chao Fan
---
arch/x86/boot/compressed/kaslr.c | 231 +++
arch/x86/boot
ally weird. And Chao also is helping
>to try on his side.
Hi Bao,
After testing for 10 times, no problem happened.
Maybe you did something wrong in the first time.
Thanks,
Chao Fan
>
>>
>> On 08/04/17 at 03:26pm, Baoquan He wrote:
>> > Patch 1/2 is newly added to add
201 - 300 of 317 matches
Mail list logo