* [PATCH] mm: add restriction when memory_hotplug config enable
@ 2016-08-01 15:00 zhongjiang
2016-08-01 19:54 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: zhongjiang @ 2016-08-01 15:00 UTC (permalink / raw)
To: akpm; +Cc: linux-mm
From: zhong jiang <zhongjiang@huawei.com>
At present, It is obvious that memory online and offline will fail
when KASAN enable, therefore, it is necessary to add the condition
to limit the memory_hotplug when KASAN enable.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
mm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/Kconfig b/mm/Kconfig
index 3e2daef..f6dd77e 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -187,6 +187,7 @@ config MEMORY_HOTPLUG
bool "Allow for memory hot-add"
depends on SPARSEMEM || X86_64_ACPI_NUMA
depends on ARCH_ENABLE_MEMORY_HOTPLUG
+ depends on !KASAN
config MEMORY_HOTPLUG_SPARSE
def_bool y
--
1.8.3.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: add restriction when memory_hotplug config enable
2016-08-01 15:00 [PATCH] mm: add restriction when memory_hotplug config enable zhongjiang
@ 2016-08-01 19:54 ` Andrew Morton
2016-08-02 1:41 ` zhong jiang
2016-08-02 10:40 ` Andrey Ryabinin
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Morton @ 2016-08-01 19:54 UTC (permalink / raw)
To: zhongjiang
Cc: linux-mm, Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
kasan-dev
On Mon, 1 Aug 2016 23:00:51 +0800 zhongjiang <zhongjiang@huawei.com> wrote:
> From: zhong jiang <zhongjiang@huawei.com>
>
> At present, It is obvious that memory online and offline will fail
> when KASAN enable,
huh, I didn't know that. What's the problem and are there plans to fix it?
> therefore, it is necessary to add the condition
> to limit the memory_hotplug when KASAN enable.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
> mm/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 3e2daef..f6dd77e 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -187,6 +187,7 @@ config MEMORY_HOTPLUG
> bool "Allow for memory hot-add"
> depends on SPARSEMEM || X86_64_ACPI_NUMA
> depends on ARCH_ENABLE_MEMORY_HOTPLUG
> + depends on !KASAN
>
> config MEMORY_HOTPLUG_SPARSE
> def_bool y
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: add restriction when memory_hotplug config enable
2016-08-01 19:54 ` Andrew Morton
@ 2016-08-02 1:41 ` zhong jiang
2016-08-02 10:40 ` Andrey Ryabinin
1 sibling, 0 replies; 6+ messages in thread
From: zhong jiang @ 2016-08-02 1:41 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
kasan-dev
On 2016/8/2 3:54, Andrew Morton wrote:
> On Mon, 1 Aug 2016 23:00:51 +0800 zhongjiang <zhongjiang@huawei.com> wrote:
>
>> From: zhong jiang <zhongjiang@huawei.com>
>>
>> At present, It is obvious that memory online and offline will fail
>> when KASAN enable,
> huh, I didn't know that. What's the problem and are there plans to fix it?
when I test the memory hotplug function. The memory online and offline always fails.
because I forget the turn off the KASAN config. I know it is not compatible with hotplug.
In fact, but I always forget to do so.
>> therefore, it is necessary to add the condition
>> to limit the memory_hotplug when KASAN enable.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>> mm/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/mm/Kconfig b/mm/Kconfig
>> index 3e2daef..f6dd77e 100644
>> --- a/mm/Kconfig
>> +++ b/mm/Kconfig
>> @@ -187,6 +187,7 @@ config MEMORY_HOTPLUG
>> bool "Allow for memory hot-add"
>> depends on SPARSEMEM || X86_64_ACPI_NUMA
>> depends on ARCH_ENABLE_MEMORY_HOTPLUG
>> + depends on !KASAN
>>
>> config MEMORY_HOTPLUG_SPARSE
>> def_bool y
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: add restriction when memory_hotplug config enable
2016-08-01 19:54 ` Andrew Morton
2016-08-02 1:41 ` zhong jiang
@ 2016-08-02 10:40 ` Andrey Ryabinin
2016-08-03 5:53 ` zhong jiang
1 sibling, 1 reply; 6+ messages in thread
From: Andrey Ryabinin @ 2016-08-02 10:40 UTC (permalink / raw)
To: Andrew Morton, zhongjiang
Cc: linux-mm, Alexander Potapenko, Dmitry Vyukov, kasan-dev
On 08/01/2016 10:54 PM, Andrew Morton wrote:
> On Mon, 1 Aug 2016 23:00:51 +0800 zhongjiang <zhongjiang@huawei.com> wrote:
>
>> From: zhong jiang <zhongjiang@huawei.com>
>>
>> At present, It is obvious that memory online and offline will fail
>> when KASAN enable,
>
> huh, I didn't know that.
Ahem... https://lkml.kernel.org/r/<20150130133552.580f73b97a9bd007979b5419@linux-foundation.org>
Also
commit 786a8959912eb94fc2381c2ae487a96ce55dabca
kasan: disable memory hotplug
Currently memory hotplug won't work with KASan. As we don't have shadow
for hotplugged memory, kernel will crash on the first access to it. To
make this work we will need to allocate shadow for new memory.
At some future point proper memory hotplug support will be implemented.
Until then, print a warning at startup and disable memory hot-add.
> What's the problem and are there plans to fix it?
Nobody complained, so I didn't bother to fix it.
The fix for this should be simple, I'll look into this.
>
>> therefore, it is necessary to add the condition
>> to limit the memory_hotplug when KASAN enable.
>>
I don't understand why we need Kconfig dependency.
Why is that better than runtime warn message?
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>> mm/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/mm/Kconfig b/mm/Kconfig
>> index 3e2daef..f6dd77e 100644
>> --- a/mm/Kconfig
>> +++ b/mm/Kconfig
>> @@ -187,6 +187,7 @@ config MEMORY_HOTPLUG
>> bool "Allow for memory hot-add"
>> depends on SPARSEMEM || X86_64_ACPI_NUMA
>> depends on ARCH_ENABLE_MEMORY_HOTPLUG
>> + depends on !KASAN
>>
>> config MEMORY_HOTPLUG_SPARSE
>> def_bool y
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: add restriction when memory_hotplug config enable
2016-08-02 10:40 ` Andrey Ryabinin
@ 2016-08-03 5:53 ` zhong jiang
2016-08-04 20:08 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: zhong jiang @ 2016-08-03 5:53 UTC (permalink / raw)
To: Andrey Ryabinin
Cc: Andrew Morton, linux-mm, Alexander Potapenko, Dmitry Vyukov,
kasan-dev
On 2016/8/2 18:40, Andrey Ryabinin wrote:
>
> On 08/01/2016 10:54 PM, Andrew Morton wrote:
>> On Mon, 1 Aug 2016 23:00:51 +0800 zhongjiang <zhongjiang@huawei.com> wrote:
>>
>>> From: zhong jiang <zhongjiang@huawei.com>
>>>
>>> At present, It is obvious that memory online and offline will fail
>>> when KASAN enable,
>> huh, I didn't know that.
> Ahem... https://lkml.kernel.org/r/<20150130133552.580f73b97a9bd007979b5419@linux-foundation.org>
>
> Also
>
> commit 786a8959912eb94fc2381c2ae487a96ce55dabca
> kasan: disable memory hotplug
>
> Currently memory hotplug won't work with KASan. As we don't have shadow
> for hotplugged memory, kernel will crash on the first access to it. To
> make this work we will need to allocate shadow for new memory.
>
> At some future point proper memory hotplug support will be implemented.
> Until then, print a warning at startup and disable memory hot-add.
>
>
>
>> What's the problem and are there plans to fix it?
> Nobody complained, so I didn't bother to fix it.
> The fix for this should be simple, I'll look into this.
>
>>> therefore, it is necessary to add the condition
>>> to limit the memory_hotplug when KASAN enable.
>>>
> I don't understand why we need Kconfig dependency.
> Why is that better than runtime warn message?
The user rarely care about the runtime warn message when the
system is good running. In fact, They are confilct with each other.
For me, I know the reason. but I always forget to do so. As a result,
I test the memory hotplug fails again. so, I hope to add the explicit dependency.
Thanks
zhongjiang
>>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>>> ---
>>> mm/Kconfig | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/mm/Kconfig b/mm/Kconfig
>>> index 3e2daef..f6dd77e 100644
>>> --- a/mm/Kconfig
>>> +++ b/mm/Kconfig
>>> @@ -187,6 +187,7 @@ config MEMORY_HOTPLUG
>>> bool "Allow for memory hot-add"
>>> depends on SPARSEMEM || X86_64_ACPI_NUMA
>>> depends on ARCH_ENABLE_MEMORY_HOTPLUG
>>> + depends on !KASAN
>>>
>>> config MEMORY_HOTPLUG_SPARSE
>>> def_bool y
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: add restriction when memory_hotplug config enable
2016-08-03 5:53 ` zhong jiang
@ 2016-08-04 20:08 ` Andrew Morton
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2016-08-04 20:08 UTC (permalink / raw)
To: zhong jiang
Cc: Andrey Ryabinin, linux-mm, Alexander Potapenko, Dmitry Vyukov,
kasan-dev
On Wed, 3 Aug 2016 13:53:10 +0800 zhong jiang <zhongjiang@huawei.com> wrote:
> On 2016/8/2 18:40, Andrey Ryabinin wrote:
> >
> > On 08/01/2016 10:54 PM, Andrew Morton wrote:
> >> On Mon, 1 Aug 2016 23:00:51 +0800 zhongjiang <zhongjiang@huawei.com> wrote:
> >>
> >>> From: zhong jiang <zhongjiang@huawei.com>
> >>>
> >>> At present, It is obvious that memory online and offline will fail
> >>> when KASAN enable,
> >> huh, I didn't know that.
> > Ahem... https://lkml.kernel.org/r/<20150130133552.580f73b97a9bd007979b5419@linux-foundation.org>
> >
> > Also
> >
> > commit 786a8959912eb94fc2381c2ae487a96ce55dabca
> > kasan: disable memory hotplug
> >
> > Currently memory hotplug won't work with KASan. As we don't have shadow
> > for hotplugged memory, kernel will crash on the first access to it. To
> > make this work we will need to allocate shadow for new memory.
> >
> > At some future point proper memory hotplug support will be implemented.
> > Until then, print a warning at startup and disable memory hot-add.
> >
> >
> >
> >> What's the problem and are there plans to fix it?
> > Nobody complained, so I didn't bother to fix it.
> > The fix for this should be simple, I'll look into this.
> >
> >>> therefore, it is necessary to add the condition
> >>> to limit the memory_hotplug when KASAN enable.
> >>>
> > I don't understand why we need Kconfig dependency.
> > Why is that better than runtime warn message?
> The user rarely care about the runtime warn message when the
> system is good running. In fact, They are confilct with each other.
> For me, I know the reason. but I always forget to do so. As a result,
> I test the memory hotplug fails again. so, I hope to add the explicit dependency.
Yes, I think it's better to disable the configuration than to permit
people to run known-to-be-broken kernel setups - that will just cause
confusion and pointless bug reports. Let's undo the Kconfig change
when this gets fixed up.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-08-04 20:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-01 15:00 [PATCH] mm: add restriction when memory_hotplug config enable zhongjiang
2016-08-01 19:54 ` Andrew Morton
2016-08-02 1:41 ` zhong jiang
2016-08-02 10:40 ` Andrey Ryabinin
2016-08-03 5:53 ` zhong jiang
2016-08-04 20:08 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).