Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp249912ybe; Wed, 4 Sep 2019 19:13:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFldZGV819Mw0LsE50e+yhZRJAGxJhrIiWNnMECe8TiRmD/bzP8fSW4ij/y2j0E9NvEVDg X-Received: by 2002:a62:82cb:: with SMTP id w194mr854981pfd.181.1567649618110; Wed, 04 Sep 2019 19:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567649618; cv=none; d=google.com; s=arc-20160816; b=ZzMFXYfWKd++lS5YFVX1xNOihXehY53Tj7v0w1KTVsnbN81e7NI8gPrPYN+dW34w+4 uUOBlHBUh1v4dcdsxc91Wqf7FR9Plr4OVMxgLg8l9K7Xud7t4wI5YBRRv/XjvOHfaD0k EQ87v/lb2uaM86RTFkyp1rVUAcSIbT4Nbd2OoeA6exSyj0+0OKHvtyCRKXIhHTWiecr5 vsG2L6eiXraMITGbso5+wTS7IXa/NUUBqfTVyCwfr9wDI2PoV5Q6U3L6UtZHJ67i8Ll5 0zru4qeYJWtW8aZefizlYul1aMU878AdiYSneI9m2Ce/gY/8UWThW/YDoQKRqdSc1VCM 6s8g== 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=44K2RMvDlyMUuJv+Ew7sgcZ2GN+ORnaEZF+Qp/0BFq0=; b=AzAo8H+4n6wjTD0bfcaReozJK+zlsN3Ry2Oa9TsqoIAsXe7TcTgkPbXWE3dUWVqcRp SbrPYkiP+k/ZAPUII2S8eclY6L0doF5qJEZxSFQYbLESIXa+O5RyvlVpjxfE7tpgTSQ9 6CJC71r7M/DDCDNSj9xfWRgAw/KyJ6Q6X7Cl/RlzjPlmfdfxt4iDjRORQvOMb78dG6Wr 60VTDn25yzNSJ2t8D4q3MWg1x7oE8dZHMuAsNHx1LmkCm1prnEoOjErICDURrPRbhVxU r5jVIww3QpZjSzDrZxBphWdx2LRV43Nn3P4PwlZGzBRmGDLSbtkHMpE8kAR4da/tQngS cv2A== 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 123si584091pfy.61.2019.09.04.19.13.22; Wed, 04 Sep 2019 19:13:38 -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 S1730684AbfIEByp (ORCPT + 99 others); Wed, 4 Sep 2019 21:54:45 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:26599 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727156AbfIEByp (ORCPT ); Wed, 4 Sep 2019 21:54:45 -0400 X-UUID: e1c814d6fac6479dbb5a3b406a2fee58-20190905 X-UUID: e1c814d6fac6479dbb5a3b406a2fee58-20190905 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1846864118; Thu, 05 Sep 2019 09:54:37 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 5 Sep 2019 09:54:34 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 5 Sep 2019 09:54:34 +0800 Message-ID: <1567648476.32522.36.camel@mtksdccf07> Subject: Re: [PATCH 1/2] mm/kasan: dump alloc/free stack for page allocator From: Walter Wu To: Qian Cai CC: Dmitry Vyukov , Matthias Brugger , Andrew Morton , "Martin Schwidefsky" , Arnd Bergmann , kasan-dev , Linux Memory Management List , LKML , Linux ARM , , , Alexander Potapenko , "Andrey Ryabinin" Date: Thu, 5 Sep 2019 09:54:36 +0800 In-Reply-To: <1567607824.5576.77.camel@lca.pw> References: <20190904065133.20268-1-walter-zh.wu@mediatek.com> <1567606591.32522.21.camel@mtksdccf07> <1567607824.5576.77.camel@lca.pw> 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 10:37 -0400, Qian Cai wrote: > On Wed, 2019-09-04 at 22:16 +0800, Walter Wu wrote: > > 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. > > Or you can try to look into reducing the memory footprint of PAGE_OWNER to fit > your needs. It does not always need to be that way. Thanks your suggestion. We can try to think what can be slimmed. Thanks. Walter