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

From: Dan Williams
Date: Mon Jul 02 2018 - 13:28:30 EST


On Mon, Jul 2, 2018 at 10:22 AM, Andrey Ryabinin
<aryabinin@xxxxxxxxxxxxx> 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't be reused for ordinary hotpluggable memory.

While this does not happen today we are looking to support it the
future. I.e. have userspace policy pick whether to access an address
range through a device-file mmap, or treat it as typical memory.