From patchwork Sat May 9 00:05:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 6368041 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E603ABEEE1 for ; Sat, 9 May 2015 00:10:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 24FCD202EC for ; Sat, 9 May 2015 00:10:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5418D201F4 for ; Sat, 9 May 2015 00:10:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YqsHW-0001bn-6E; Sat, 09 May 2015 00:06:14 +0000 Received: from mail-ie0-f182.google.com ([209.85.223.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YqsHR-0001aV-JP for linux-arm-kernel@lists.infradead.org; Sat, 09 May 2015 00:06:10 +0000 Received: by iecnq11 with SMTP id nq11so75425917iec.3 for ; Fri, 08 May 2015 17:05:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=NOANhKYHBM9GYDlyQ+gsHL0uupb7+WE/gNM3QKk5QgI=; b=G4FQJzNW0d5yqJi8aEz3r3K33OTU2OXQMoZTprqvM4oo/Fm1iTmyLTFMCAEYKAHHNi /KmWVR1nxH1FHHwrHNqbOnG19JIJFQXV1uff0dkwK61ojpRB+ueRPyM1cRBt1TfqiBow bEu8Gwt5YmE4oevS1p3sCLICqglp0XR3v8uISxTXRcYSsqhD2Z8zgsaPicYmGO3Vrm0w qlAp0F9OAJYtQEA/pdl/jseJOITmVdeommERyV17HY78diMWoO8kvhDveOGKPSRGtmzw utXi9AJuYKmX0xDIv6lqPw/kU0bRhL3quUeDD0b/pidnvhrfMmAvOU3NkWvLmTd7dgUA ATbQ== X-Gm-Message-State: ALoCoQlSw5zt3sjEiR7+Tw7n5WlQNfqEt0kJ1Gto+zsO8h9MFOtJ+yOif96bVT+8//BXqGp2dKo0 X-Received: by 10.42.52.4 with SMTP id h4mr710805icg.32.1431129947575; Fri, 08 May 2015 17:05:47 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1301:401d:3aca:e112:152b]) by mx.google.com with ESMTPSA id j4sm633293igo.0.2015.05.08.17.05.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 08 May 2015 17:05:47 -0700 (PDT) Date: Fri, 8 May 2015 17:05:44 -0700 From: Dmitry Torokhov To: Joerg Roedel , Kukjin Kim Subject: [PATCH] iommu: exynos: tell kmemleak to ignore 2nd level page tables Message-ID: <20150509000544.GA29904@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150508_170609_685102_80E581FB X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: linux-samsung-soc@vger.kernel.org, Shaik Ameer Basha , Doug Anderson , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Colin Cross , Cho KyongHo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Cross The pointers to the 2nd level page tables are converted to 1st level page table entries, which means kmemleak can't find them and assumes they have been leaked. Call kmemleak_ignore on the 2nd level page tables to prevent them from showing up in kmemleak reports. Signed-off-by: Colin Cross Signed-off-by: Dmitry Torokhov --- drivers/iommu/exynos-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index dc14fec4..16920b2 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -855,6 +855,7 @@ static sysmmu_pte_t *alloc_lv2entry(struct exynos_iommu_domain *priv, return ERR_PTR(-ENOMEM); *sent = mk_lv1ent_page(virt_to_phys(pent)); + kmemleak_ignore(pent); *pgcounter = NUM_LV2ENTRIES; pgtable_flush(pent, pent + NUM_LV2ENTRIES); pgtable_flush(sent, sent + 1);