From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97183C4740A for ; Tue, 10 Sep 2019 09:44:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6586C20863 for ; Tue, 10 Sep 2019 09:44:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6586C20863 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F247A6B0006; Tue, 10 Sep 2019 05:44:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ED5356B0008; Tue, 10 Sep 2019 05:44:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC3456B000A; Tue, 10 Sep 2019 05:44:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id BE3876B0006 for ; Tue, 10 Sep 2019 05:44:09 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 69DC622007 for ; Tue, 10 Sep 2019 09:44:09 +0000 (UTC) X-FDA: 75918525018.02.desk72_5e58a3cccb901 X-HE-Tag: desk72_5e58a3cccb901 X-Filterd-Recvd-Size: 4010 Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Sep 2019 09:44:07 +0000 (UTC) X-UUID: 7db3989441fd4168b9615b951f209fdb-20190910 X-UUID: 7db3989441fd4168b9615b951f209fdb-20190910 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1966950674; Tue, 10 Sep 2019 17:44:03 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Sep 2019 17:43:58 +0800 Received: from [172.21.84.99] (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Sep 2019 17:43:58 +0800 Message-ID: <1568108638.24886.7.camel@mtksdccf07> Subject: Re: [PATCH v2 1/2] mm/page_ext: support to record the last stack of page From: Walter Wu To: "Kirill A. Shutemov" CC: David Hildenbrand , Andrey Ryabinin , Alexander Potapenko , "Dmitry Vyukov" , Matthias Brugger , Andrew Morton , Martin Schwidefsky , Will Deacon , Andrey Konovalov , Arnd Bergmann , Thomas Gleixner , Michal Hocko , Qian Cai , , , , , , Date: Tue, 10 Sep 2019 17:43:58 +0800 In-Reply-To: <20190910093103.4cmqk4semlhgpmle@box.shutemov.name> References: <20190909085339.25350-1-walter-zh.wu@mediatek.com> <36b5a8e0-2783-4c0e-4fc7-78ea652ba475@redhat.com> <1568077669.24886.3.camel@mtksdccf07> <20190910093103.4cmqk4semlhgpmle@box.shutemov.name> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 2019-09-10 at 12:31 +0300, Kirill A. Shutemov wrote: > On Tue, Sep 10, 2019 at 09:07:49AM +0800, Walter Wu wrote: > > On Mon, 2019-09-09 at 12:57 +0200, David Hildenbrand wrote: > > > 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? > > > > > This is patchsets, it need another patch2. > > We have verified it by running KASAN UT on Qemu. > > Any patchset must be bisectable: do not break anything in the middle of > patchset. > Thanks your reminder. I should explain complete message at commit log. Our patchsets is below: https://lkml.org/lkml/2019/9/9/104 https://lkml.org/lkml/2019/9/9/123