Re: [PATCH v3] mm/kasan: dump alloc and free stack for page allocator

From: Vlastimil Babka
Date: Mon Sep 16 2019 - 05:42:39 EST


On 9/12/19 7:05 PM, Andrey Ryabinin wrote:
>
> Or another alternative option (and actually easier one to implement), leave PAGE_OWNER as is (no "select"s in Kconfigs)
> Make PAGE_OWNER_FREE_STACK like this:
>
> +config PAGE_OWNER_FREE_STACK
> + def_bool KASAN || DEBUG_PAGEALLOC
> + depends on PAGE_OWNER
> +
>
> So, users that want alloc/free stack will have to enable CONFIG_PAGE_OWNER=y and add page_owner=on to boot cmdline.
>
>
> Basically the difference between these alternative is whether we enable page_owner by default or not. But there is always a possibility to disable it.

OK, how about this?

BTW, the bugzilla [1] also mentions that on overflow we might be dumping
the wrong page (including stacks). I'll leave that to somebody familiar
with KASAN internals though.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=203967

----8<----