Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp996746yba; Thu, 4 Apr 2019 02:03:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJ0Kx8EK3nVPyCvZkfrmtLPi0gaCJ4l2Hr56Jj2VceJdxM/aiXsuqmHgXYuSO+F1PokLBu X-Received: by 2002:a62:7089:: with SMTP id l131mr4736120pfc.158.1554368588329; Thu, 04 Apr 2019 02:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368588; cv=none; d=google.com; s=arc-20160816; b=vk9NJBcyQi4EHHuJfAb5YSY8wsxx/9Sb7UhmoJqh5vLBPJIbosn7H4kF5YpG6OCwU1 3nm7SVLRizTi5SDrwGRpW/WENrENt0KwDAHMO9HaVvO9UDIJ0jGZqirgq4vABJIPn7b5 dVekydnkPkpMMprrkvvWEuVwKX/z31Hd1xiIvRbJcnjpx6rx41T+Nb/UIZkiCQIznmXJ EPUahfsjq8dxUvSex7Zx8njzOG/9YRPCiiYQnXFn9/lz1fxqNFAVyW9ZgKlb5PJ4j8rc A/3RpSDdPiIw6qJxQbVTGA68RFFhZhrlPZs73oFsJq4xgI5M1hFbPnqIEe5uvh++8NTl lC5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w7zHdmjJpR+MLdQTjquS2ojZgJs0lqoqcHyEqFnAMBs=; b=YZ1N+BTTCQQPxLbLPCt98+APF8sfpMcIT3krwOdO2AGpZs+OtegzByDqu648I2KIFs KlpUzn4fkAHKObOLxNQ8NOY4TruI4TdAoCRPkSlswjwK3zUCAHBvTdgkAVKySppI8/E1 N1OQK8T44T6tnQ0wmEsXwe9i2pfzZEjzG5ec6aBcMfnNnw/7gbLou/412j3PH5f/y+Ni UGjkDXSD5oFNKL+zWgPVd1bL7kWjD1a2k/F8lGZpl6kfKKxoV6ziY6TJ+jqW5CJWEYlT Q9Bk7lFaUybP2MSgTkYvOEJ4ctxRAo7c/p4lsFJM1E+MxMgsffY3mMAsdLf+N2Jx4uhe g13Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bEDTXhDj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si13918025plp.369.2019.04.04.02.02.53; Thu, 04 Apr 2019 02:03:08 -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; dkim=pass header.i=@kernel.org header.s=default header.b=bEDTXhDj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731606AbfDDJCV (ORCPT + 99 others); Thu, 4 Apr 2019 05:02:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:39640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731596AbfDDJCT (ORCPT ); Thu, 4 Apr 2019 05:02:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9A79221741; Thu, 4 Apr 2019 09:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368538; bh=MyPKGGsJf3xC4h1Tsf5ti2Tc2odgU0FuZsYygMpeOpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bEDTXhDjMVjKfvvLctX05NxgWD93KLkJ50Ae+GU/JfVZGKOS3NdY78OUIVuAPNvxs rYMn5LvgyMb/a7GnsdfwyjuHTR64vtypsE3/jyEICcx/O1yhHk6Ue+4t1ebjJQkc9s PZ9l2CWDE/LUR2QKypjycu8CQEeYmlNT0W69hkfQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Boichat , Will Deacon , Joerg Roedel , Sasha Levin Subject: [PATCH 4.19 060/187] iommu/io-pgtable-arm-v7s: Only kmemleak_ignore L2 tables Date: Thu, 4 Apr 2019 10:46:37 +0200 Message-Id: <20190404084605.907377087@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 032ebd8548c9d05e8d2bdc7a7ec2fe29454b0ad0 ] L1 tables are allocated with __get_dma_pages, and therefore already ignored by kmemleak. Without this, the kernel would print this error message on boot, when the first L1 table is allocated: [ 2.810533] kmemleak: Trying to color unknown object at 0xffffffd652388000 as Black [ 2.818190] CPU: 5 PID: 39 Comm: kworker/5:0 Tainted: G S 4.19.16 #8 [ 2.831227] Workqueue: events deferred_probe_work_func [ 2.836353] Call trace: ... [ 2.852532] paint_ptr+0xa0/0xa8 [ 2.855750] kmemleak_ignore+0x38/0x6c [ 2.859490] __arm_v7s_alloc_table+0x168/0x1f4 [ 2.863922] arm_v7s_alloc_pgtable+0x114/0x17c [ 2.868354] alloc_io_pgtable_ops+0x3c/0x78 ... Fixes: e5fc9753b1a8314 ("iommu/io-pgtable: Add ARMv7 short descriptor support") Signed-off-by: Nicolas Boichat Acked-by: Will Deacon Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/io-pgtable-arm-v7s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c index fde728ea2900..48d4709a8e93 100644 --- a/drivers/iommu/io-pgtable-arm-v7s.c +++ b/drivers/iommu/io-pgtable-arm-v7s.c @@ -228,7 +228,8 @@ static void *__arm_v7s_alloc_table(int lvl, gfp_t gfp, if (dma != phys) goto out_unmap; } - kmemleak_ignore(table); + if (lvl == 2) + kmemleak_ignore(table); return table; out_unmap: -- 2.19.1