From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: Re: [PATCH v2 1/2] mm/page_ext: support to record the last stack of page Date: Mon, 9 Sep 2019 12:57:03 +0200 Message-ID: <36b5a8e0-2783-4c0e-4fc7-78ea652ba475@redhat.com> References: <20190909085339.25350-1-walter-zh.wu@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190909085339.25350-1-walter-zh.wu@mediatek.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Walter Wu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger , Andrew Morton , Martin Schwidefsky , Will Deacon , Andrey Konovalov , Arnd Bergmann , Thomas Gleixner , Michal Hocko , Qian Cai Cc: linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com List-Id: linux-mediatek@lists.infradead.org On 09.09.19 10:53, Walter Wu wrote: > KASAN will record last stack of page in order to help programmer > to see memory corruption caused by page. > > What is difference between page_owner and our patch? > page_owner records alloc stack of page, but our patch is to record > last stack(it may be alloc or free stack of page). > > Signed-off-by: Walter Wu > --- > mm/page_ext.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/mm/page_ext.c b/mm/page_ext.c > index 5f5769c7db3b..7ca33dcd9ffa 100644 > --- a/mm/page_ext.c > +++ b/mm/page_ext.c > @@ -65,6 +65,9 @@ static struct page_ext_operations *page_ext_ops[] = { > #if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT) > &page_idle_ops, > #endif > +#ifdef CONFIG_KASAN > + &page_stack_ops, > +#endif > }; > > static unsigned long total_usage; > Are you sure this patch compiles? t460s: ~/git/linux virtio-mem $ git grep page_stack_ops t460s: ~/git/linux virtio-mem $ -- Thanks, David / dhildenb