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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 B0CE2C4CEC5 for ; Thu, 12 Sep 2019 14:08:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5822F20830 for ; Thu, 12 Sep 2019 14:08:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5822F20830 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F168D6B0006; Thu, 12 Sep 2019 10:08:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EECBD6B0007; Thu, 12 Sep 2019 10:08:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E294F6B0008; Thu, 12 Sep 2019 10:08:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id BD6DA6B0006 for ; Thu, 12 Sep 2019 10:08:42 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 5A3292C2E for ; Thu, 12 Sep 2019 14:08:42 +0000 (UTC) X-FDA: 75926449284.26.spade76_2ec51b22d0a0e X-HE-Tag: spade76_2ec51b22d0a0e X-Filterd-Recvd-Size: 2722 Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Sep 2019 14:08:41 +0000 (UTC) Received: from [172.16.25.5] by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i8Plm-0008P3-U4; Thu, 12 Sep 2019 17:08:23 +0300 Subject: Re: [PATCH v3] mm/kasan: dump alloc and free stack for page allocator To: Vlastimil Babka , Qian Cai , Walter Wu Cc: Alexander Potapenko , Dmitry Vyukov , Matthias Brugger , Andrew Morton , Martin Schwidefsky , Andrey Konovalov , Arnd Bergmann , 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 References: <20190911083921.4158-1-walter-zh.wu@mediatek.com> <5E358F4B-552C-4542-9655-E01C7B754F14@lca.pw> From: Andrey Ryabinin Message-ID: Date: Thu, 12 Sep 2019 17:08:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 9/12/19 4:53 PM, Vlastimil Babka wrote: > On 9/11/19 5:19 PM, Qian Cai wrote: >> >> The new config looks redundant and confusing. It looks to me more of a document update >> in Documentation/dev-tools/kasan.txt to educate developers to select PAGE_OWNER and >> DEBUG_PAGEALLOC if needed. > > Agreed. But if you want it fully automatic, how about something > like this (on top of mmotm/next)? If you agree I'll add changelog > and send properly. > > ----8<---- > > From a528d14c71d7fdf5872ca8ab3bd1b5bad26670c9 Mon Sep 17 00:00:00 2001 > From: Vlastimil Babka > Date: Thu, 12 Sep 2019 15:51:23 +0200 > Subject: [PATCH] make KASAN enable page_owner with free stack capture > > --- > include/linux/page_owner.h | 1 + > lib/Kconfig.kasan | 4 ++++ > mm/Kconfig.debug | 5 +++++ > mm/page_alloc.c | 6 +++++- > mm/page_owner.c | 37 ++++++++++++++++++++++++------------- > 5 files changed, 39 insertions(+), 14 deletions(-) > Looks ok to me. This certainly better than full dependency on the DEBUG_PAGEALLOC which we don't need.