Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758256Ab0FBOMl (ORCPT ); Wed, 2 Jun 2010 10:12:41 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:38855 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755184Ab0FBOMk (ORCPT ); Wed, 2 Jun 2010 10:12:40 -0400 Subject: Re: [PATCH v2 0/3] kmemleak: Fix false positive with special scan From: Catalin Marinas To: Hiroshi DOYU Cc: linux-kernel@vger.kernel.org, ext-phil.2.carmody@nokia.com, linux-omap@vger.kernel.org In-Reply-To: <20100602.143458.232754971.Hiroshi.DOYU@nokia.com> References: <20100602.143458.232754971.Hiroshi.DOYU@nokia.com> Content-Type: text/plain; charset="UTF-8" Organization: ARM Limited Date: Wed, 02 Jun 2010 15:12:29 +0100 Message-ID: <1275487949.23442.9.camel@e102109-lin.cambridge.arm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Jun 2010 14:12:29.0301 (UTC) FILETIME=[A293F250:01CB025D] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1387 Lines: 38 On Wed, 2010-06-02 at 12:34 +0100, Hiroshi DOYU wrote: > From: ext Catalin Marinas > > Can we not add a new prio tree (or just use the existing one) for > > pointer aliases? The advantage is that you only have a single function > > to call, something like kmemleak_add_alias() and you do it at the point > > the value was converted. > > Actually I considered the above aliasing a little bit but I gave up > soon. > > I was afraid that this method might consume way more memory since this > just adds another member for "struct kmemleak_object", but adding a > single member for all objects. The number of kmemleak_object is > usually numerous. We could use a different tree with a "struct kmemleak_alias" structure which is much smaller. Something like below: struct kmemleak_alias { struct list_head alias_list; struct prio_tree_node tree_node; struct kmemleak_object *object; } And an alias_list member would be added to kmemleak_object as well. Would the alias tree need to allow overlapping? Like different IOMMU mappings with the same address (but pointing to different physical memory). -- 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/