Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2535796ybe; Thu, 12 Sep 2019 10:53:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKy3O3m1QpFbjFeaP/to4rwN3n2H0vkVPyjEtNvQXnlgCYeTyE2Sa0/8F1VmnRi6goHefQ X-Received: by 2002:a50:e886:: with SMTP id f6mr10594805edn.199.1568310811408; Thu, 12 Sep 2019 10:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568310811; cv=none; d=google.com; s=arc-20160816; b=0Jvg3RgpcAsyI3rd4X8mbLLU6ozrI5YRuHbBpEZk2hjODsfMXp1f2fcNLUDI39uzB+ 6ZanSvvLAwrqDrCSNDq5W2d1BRjhLWCeYtNPWHPfNpMxML0/nkcVZvtsi+NshoLG0npa RalaHNf8WgEa/iYxGblyt2gTUyhuxASQY3XYV1cYAco9HxBHVy0brcdWWB2P8WkZAyqO k6CVePFgCJbQjafaSSLfLxrOoZzMXkoM5X3jDEnwEQz5lotqXjCI7P04NZiua3D5lutn AqRCKvCEvVuSUBLhRJ9TB0su52iSD5AecOviK2mMBwW8wFbG7sZ860cJIm5+UvCMTpt9 pL1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=zSC6VrtWvqGOkWuBv2AldD+/BDY2YAJUIjmOQn8Hwtc=; b=hBe+7UxhaBWN580OEJNi6KDU7WzrQrOpiYoC9OzvN6vdVAPRp5c4Npi6NwQ2HJt9jS Z7wT6hkTC6qnDHW4BbHHeVqh4/i5PxP4EU3hz82KpAEqn7srFJX/QVLuyPM++Rwiuia0 wG9AJ4hiiVHmHmZ8tdGBnDwgnLcOfPbHPp5jhNXrzH67IvEnsAxv6zQ+VfNsY0y8LJwn c6e+88B6q5krPROq0OS+e++QPTRYiwezKiy4SxzOBZYEm7EgbvxAzHs1uQ7Y/3nWfgcb QSBa2wj2vdlAYQGjSeybTy/XD07VdB1INgocXxjk4DhD6rwtpn8djYKnZGvINSz77rm7 QDkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20si14515834edc.359.2019.09.12.10.53.07; Thu, 12 Sep 2019 10:53:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732490AbfILOIp (ORCPT + 99 others); Thu, 12 Sep 2019 10:08:45 -0400 Received: from relay.sw.ru ([185.231.240.75]:42496 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732389AbfILOIo (ORCPT ); Thu, 12 Sep 2019 10:08:44 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.