Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758589AbbLBNsw (ORCPT ); Wed, 2 Dec 2015 08:48:52 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:33881 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758388AbbLBNsu (ORCPT ); Wed, 2 Dec 2015 08:48:50 -0500 Subject: Re: [RFC PATCH v2] iommu/amd: gray the 'irq_remap_table' object for kmemleak To: Borislav Petkov References: <565ECE54.5080706@profitbricks.com> <565ED81B.3020606@profitbricks.com> <20151202115142.GD18805@8bytes.org> <565EE4AA.4070309@profitbricks.com> <20151202125315.GB3910@pd.tnic> <565EEBC3.5050807@profitbricks.com> <20151202131300.GC3910@pd.tnic> <565EEFB4.4080108@profitbricks.com> <20151202134047.GE3783@pd.tnic> Cc: Joerg Roedel , Catalin Marinas , iommu@lists.linux-foundation.org, Linux Kernel Mailing List From: Michael Wang Message-ID: <565EF6BF.6020204@profitbricks.com> Date: Wed, 2 Dec 2015 14:48:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151202134047.GE3783@pd.tnic> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1337 Lines: 36 On 12/02/2015 02:40 PM, Borislav Petkov wrote: > On Wed, Dec 02, 2015 at 02:18:44PM +0100, Michael Wang wrote: [snip] > >> Yeah, but it would be better to solve it, otherwise whoever saw this >> report will need to go into the amd-iommu, make sure it's not a real >> leak, then change their testing script... > > No, you don't need to go into the iommu - you need to fix kmemleak. > > And frankly, I'm getting sick and tired of all those tools needing > special handling and us adding code just so that they're happy. If the > tools can't figure out something, they shouldn't warn just in case but > shut up instead. If you mean the design of kmemleak, IMHO it's not that bad. The problem is regarding performance, think about if kmemleak go into every page to find out pointers, I guess the whole system will stuck. I'm not sure why amd-iommu use get_page not kmalloc to initialize the pointer table, but if it's necessary then the conflict will be there, it's not the fault of driver or kmemleak, but the design require them to cooperate with each other. Regards, Michael Wang > -- 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/