Re: [PATCH v2] kernel/memremap, kasan: Make ZONE_DEVICE with work with KASAN

2018-07-02 Thread Dan Williams
On Mon, Jul 2, 2018 at 10:22 AM, Andrey Ryabinin wrote: [..] > It could be possible to not unmap kasan_zero_page, just leave it there after > devm_memremap_pages_release(). > But we must have some guarantee that after > devm_memremap_pages()/devm_memremap_pages_release() the same > addresses can

Re: [PATCH v2] kernel/memremap, kasan: Make ZONE_DEVICE with work with KASAN

2018-07-02 Thread Andrey Ryabinin
On 06/30/2018 05:33 AM, Andrew Morton wrote: > On Fri, 29 Jun 2018 19:49:32 +0300 Andrey Ryabinin > wrote: > >> KASAN learns about hot added memory via the memory hotplug notifier. >> The devm_memremap_pages() intentionally skips calling memory hotplug >> notifiers. > > Why does it do that?

Re: [PATCH v2] kernel/memremap, kasan: Make ZONE_DEVICE with work with KASAN

2018-06-29 Thread Dan Williams
On Fri, Jun 29, 2018 at 7:33 PM, Andrew Morton wrote: > On Fri, 29 Jun 2018 19:49:32 +0300 Andrey Ryabinin > wrote: > >> KASAN learns about hot added memory via the memory hotplug notifier. >> The devm_memremap_pages() intentionally skips calling memory hotplug >> notifiers. > > Why does it do t

Re: [PATCH v2] kernel/memremap, kasan: Make ZONE_DEVICE with work with KASAN

2018-06-29 Thread Andrew Morton
On Fri, 29 Jun 2018 19:49:32 +0300 Andrey Ryabinin wrote: > KASAN learns about hot added memory via the memory hotplug notifier. > The devm_memremap_pages() intentionally skips calling memory hotplug > notifiers. Why does it do that? > So KASAN doesn't know anything about new memory added > by

Re: [PATCH v2] kernel/memremap, kasan: Make ZONE_DEVICE with work with KASAN

2018-06-29 Thread Dan Williams
On Fri, Jun 29, 2018 at 9:49 AM, Andrey Ryabinin wrote: > KASAN learns about hot added memory via the memory hotplug notifier. > The devm_memremap_pages() intentionally skips calling memory hotplug > notifiers. So KASAN doesn't know anything about new memory added > by devm_memremap_pages(). This

[PATCH v2] kernel/memremap, kasan: Make ZONE_DEVICE with work with KASAN

2018-06-29 Thread Andrey Ryabinin
KASAN learns about hot added memory via the memory hotplug notifier. The devm_memremap_pages() intentionally skips calling memory hotplug notifiers. So KASAN doesn't know anything about new memory added by devm_memremap_pages(). This causes to crash when KASAN tries to access non-existent shadow me