Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp756358ybe; Wed, 4 Sep 2019 07:19:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgErVY8RzrAOiwf3QvL+3xZjIDXKShX3HnYk09luV+yc26J4qJ7NxJ6jak3KY8Mwy9BVLg X-Received: by 2002:a17:902:d20c:: with SMTP id t12mr37740954ply.196.1567606759856; Wed, 04 Sep 2019 07:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567606759; cv=none; d=google.com; s=arc-20160816; b=fD9AMLGvtrriQ0MrT+tPi2PIZF5PaOQvNrQHajbKjh3JwjJymh0Z1yhoA1pwDKkafL Y65HRjAuF5gky0fgzgk0zAkbToTFn9L/euyGdOOPk7JstgaSKQmRy+YBwQDayLTgfUNJ 5ylIGBtkqQD08t7wJdsnKH8SxXgp+Gu1BOrPWLcEkBk2dpSOopHYvxC8zpHqBFA4QPpG G/rpAe//wt8bRBG4Cwh1XpFdHOpTKHudxgMEISfY03TQfaTsPUeAaVUOK6RfDvJFs4hm siqqP1UlU+quh2pDrUF9wL9EKnrh0ehqHbPr7UlGtOQvQo00F+GCtMik3cz7mgaAxYdZ QLUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=POmoSiLWyAZnmHAICbI6ShBML6WBOiVnbYFq588ZgA0=; b=h+hXZOyfJtu8CETJ8vHYfOT56b6OqfPtYNiwb/zrmUj6442wEqMtNnFOERYzFQ9KOl OZ5r3eV9uBVQQjt2sGbhGYBZGlLR22wVnC1L64y+1NAfgxl3CCJRXCsIXpzUf4HEuv6E HwSFRAFJzAZL/09jMLP9tpRtoKVk4xCsULkTpqI+oal+UBxvIgLvGyEak0Kmau+miYD9 sTXGJSyvdiutb2O9M1E1oKfqXkueUanH2NaP095IRom/Jiues3tq2JuWnHQr84zIusTc AT3mPGhl4pdXdB8m2oHcFROV5hjU0WtRpPiVFGwXJ4tmj0aO3mrf+Y3fpz1YxL2t7Mcp a7Ug== 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3si7512021pfa.49.2019.09.04.07.19.02; Wed, 04 Sep 2019 07:19:19 -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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730660AbfIDOQp (ORCPT + 99 others); Wed, 4 Sep 2019 10:16:45 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:25007 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727417AbfIDOQo (ORCPT ); Wed, 4 Sep 2019 10:16:44 -0400 X-UUID: ec6f2baf4842498f92829352c925dd9a-20190904 X-UUID: ec6f2baf4842498f92829352c925dd9a-20190904 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 2114202653; Wed, 04 Sep 2019 22:16:40 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 4 Sep 2019 22:16:38 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 4 Sep 2019 22:16:30 +0800 Message-ID: <1567606591.32522.21.camel@mtksdccf07> Subject: Re: [PATCH 1/2] mm/kasan: dump alloc/free stack for page allocator From: Walter Wu To: Andrey Konovalov CC: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger , Andrew Morton , "Martin Schwidefsky" , Arnd Bergmann , kasan-dev , Linux Memory Management List , LKML , Linux ARM , , Date: Wed, 4 Sep 2019 22:16:31 +0800 In-Reply-To: References: <20190904065133.20268-1-walter-zh.wu@mediatek.com> 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-09-04 at 15:44 +0200, Andrey Konovalov wrote: > On Wed, Sep 4, 2019 at 8:51 AM Walter Wu wrote: > > +config KASAN_DUMP_PAGE > > + bool "Dump the page last stack information" > > + depends on KASAN && PAGE_OWNER > > + help > > + By default, KASAN doesn't record alloc/free stack for page allocator. > > + It is difficult to fix up page use-after-free issue. > > + This feature depends on page owner to record the last stack of page. > > + It is very helpful for solving the page use-after-free or out-of-bound. > > I'm not sure if we need a separate config for this. Is there any > reason to not have this enabled by default? PAGE_OWNER need some memory usage, it is not allowed to enable by default in low RAM device. so I create new feature option and the person who wants to use it to enable it. Thanks. Walter