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=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 25C54C432C1 for ; Wed, 25 Sep 2019 09:42:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EACC7214DA for ; Wed, 25 Sep 2019 09:41:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L1u/LOFR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EACC7214DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mEIWedFYj8wEpl+uxO+iO64isVgOpspI2xO0h0kc9xs=; b=L1u/LOFRhPOLRj EZpv9Xs9yPGuBDC93fw4/cWOMPhEbSMlfQjmtpuHA05S0WzpcPqC4GW0eIyVRCyOV5IMiIvc2HXJW zCQJKryjnYMhjh3eH+rrluhPSP83iWI1Q22AF2aB+6qP4necwkoEAq0zArUXe0QsUpZWYZeBjlx0j 7LhjjSngFy6+nD5MN8f1mpZLI14oCbTYqfB9e5Ply3azgx9XRPEmkBqO61trqP5iiMgjfZeQNljml OCEFEYbEAkHkJrLqaIwuaOLEuG+2C+ouW1RD/t1r66eXF0y61o8Cuh6dwntTsycI37XPBWjyEhmqu s17rwJVQJmR4rfdcrbzA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iD3ny-0004QA-LC; Wed, 25 Sep 2019 09:41:50 +0000 Received: from relay.sw.ru ([185.231.240.75]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iD3np-0004P5-6U; Wed, 25 Sep 2019 09:41:43 +0000 Received: from [172.16.25.5] by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iD3ne-0004yL-1n; Wed, 25 Sep 2019 12:41:30 +0300 Subject: Re: [PATCH] mm, debug, kasan: save and dump freeing stack trace for kasan To: Vlastimil Babka , Walter Wu References: <20190911083921.4158-1-walter-zh.wu@mediatek.com> <5E358F4B-552C-4542-9655-E01C7B754F14@lca.pw> <1568297308.19040.5.camel@mtksdccf07> <613f9f23-c7f0-871f-fe13-930c35ef3105@suse.cz> <79fede05-735b-8477-c273-f34db93fd72b@virtuozzo.com> <6d58ce86-b2a4-40af-bf40-c604b457d086@suse.cz> <4e76e7ce-1d61-524a-622b-663c01d19707@virtuozzo.com> From: Andrey Ryabinin Message-ID: <28e076ed-d4c2-c29d-f0cb-b976e8c0725a@virtuozzo.com> Date: Wed, 25 Sep 2019 12:41:18 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190925_024141_235974_96A2DB25 X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wsd_upstream@mediatek.com, Arnd Bergmann , linux-mm@kvack.org, Andrey Konovalov , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Martin Schwidefsky , Alexander Potapenko , linux-arm-kernel@lists.infradead.org, Matthias Brugger , Qian Cai , Andrew Morton , Dmitry Vyukov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/23/19 11:20 AM, Vlastimil Babka wrote: > On 9/16/19 5:57 PM, Andrey Ryabinin wrote: >> I'd rather keep all logic in one place, i.e. "if (!page_owner_disabled && (IS_ENABLED(CONFIG_KASAN) || debug_pagealloc_enabled())" >> With this no changes in early_debug_pagealloc() required and CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y should also work correctly. > > OK. > > ----8<---- > > From 7437c43f02682fdde5680fa83e87029f7529e222 Mon Sep 17 00:00:00 2001 > From: Vlastimil Babka > Date: Mon, 16 Sep 2019 11:28:19 +0200 > Subject: [PATCH] mm, debug, kasan: save and dump freeing stack trace for kasan > > The commit "mm, page_owner, debug_pagealloc: save and dump freeing stack trace" > enhanced page_owner to also store freeing stack trace, when debug_pagealloc is > also enabled. KASAN would also like to do this [1] to improve error reports to > debug e.g. UAF issues. This patch therefore introduces a helper config option > PAGE_OWNER_FREE_STACK, which is enabled when PAGE_OWNER and either of > DEBUG_PAGEALLOC or KASAN is enabled. Boot-time, the free stack saving is > enabled when booting a KASAN kernel with page_owner=on, or non-KASAN kernel > with debug_pagealloc=on and page_owner=on. > > [1] https://bugzilla.kernel.org/show_bug.cgi?id=203967 > > Suggested-by: Dmitry Vyukov > Suggested-by: Walter Wu > Suggested-by: Andrey Ryabinin > Signed-off-by: Vlastimil Babka > --- Reviewed-by: Andrey Ryabinin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel