Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753812AbaARKpn (ORCPT ); Sat, 18 Jan 2014 05:45:43 -0500 Received: from mail-wg0-f50.google.com ([74.125.82.50]:43938 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752144AbaARKpl convert rfc822-to-8bit (ORCPT ); Sat, 18 Jan 2014 05:45:41 -0500 Subject: Re: [PATCH] mm/kmemleak: add support for re-enable kmemleak at runtime Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: text/plain; charset=us-ascii From: Catalin Marinas In-Reply-To: <52DA3E41.9050202@huawei.com> Date: Sat, 18 Jan 2014 10:45:38 +0000 Cc: Andrew Morton , "rob@landley.net" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Li Zefan , Wang Nan Content-Transfer-Encoding: 8BIT Message-Id: References: <52D8FA72.8080100@huawei.com> <20140117120436.GC28895@arm.com> <52DA3E41.9050202@huawei.com> To: Jianguo Wu X-Mailer: Apple Mail (2.1827) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18 Jan 2014, at 08:41, Jianguo Wu wrote: > On 2014/1/17 20:04, Catalin Marinas wrote: >> On Fri, Jan 17, 2014 at 09:40:02AM +0000, Jianguo Wu wrote: >>> Now disabling kmemleak is an irreversible operation, but sometimes >>> we may need to re-enable kmemleak at runtime. So add a knob to enable >>> kmemleak at runtime: >>> echo on > /sys/kernel/debug/kmemleak >> >> It is irreversible for very good reason: once it missed the initial >> memory allocations, there is no way for kmemleak to build the object >> reference graph and you'll get lots of false positives, pretty much >> making it unusable. > > Do you mean we didn't trace memory allocations during kmemleak disable period, > and these memory may reference to new allocated objects after re-enable? Yes. Those newly allocated objects would be reported as leaks. Catalin-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/