Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp537846ybk; Wed, 13 May 2020 06:43:21 -0700 (PDT) X-Google-Smtp-Source: APiQypKtSDVqdcPtuQVdvOj3XQnfSLT7HfhWSu/i6DVtVqh+EBYy1pK5+AuOw9jpe5c8E3cEZerc X-Received: by 2002:a50:fa87:: with SMTP id w7mr23164024edr.0.1589377401229; Wed, 13 May 2020 06:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589377401; cv=none; d=google.com; s=arc-20160816; b=MVVGGWoJMJBoc/wv1DqTe4LTvUOxtYu7xibm3ocerO5tXuy+R38HZ/2nJYTjpe9V5U m3VBkdt8iNmazUdvAm9bKanBYTS+KIN5s/Uy4z29rv50aHGKsjV7Hd/o686ix0cLov5Q m2rjAOJIzOFQCJpW+4xnwGflrqN+ZOT4xFTv7Qeg7rhyRBBgUmtqCTLKS6NGdvH/Qhf/ 3tBaRuJfMlBqZuX+Dqb1N7LKLsR1g6SHVJISKgzkBDrxEx1sYMFMmdHsVCwFfd1rg+1m 6tP65/M4yb/2wxbcsifoOJHrWu2Gvdu6Sc4bsbnzDNBsX3DXe+tFgHAp86dWgVmg93dd jTOA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=fIL0Xa30eWe4pB9L70dZk7zOy9oguvU9qefI9I02W/c=; b=zC2U0n/9HMj+qUnt1M4tE4KtKOKU7aB9FuEEL6fQ4ioAs/+8qnb8UAaNleieqhTjzC PJOTI9Rro8ioYV/gxbvafFxB3uEJbidMtRDuzt7EW5R0gyD3P2Ll6lQVS/C9SW7s/f8S 1eJkxDWtSELCXfcZDVr4pUn0+e0JgOAWKVCII8gmJnRP52h/g+/4TbttxkxD/RkybcnU cbNJFJJ5JTLFAJPNZmvHNDPbIyfo8FdJVYrA/Wmc9u+14Bhto5pOb2Tow8jzJStItt+1 x47XCkJDwpBB3LieosOlm64UME8IOm8Wu99+dS3KgQXM8aLoLrroS7cJqetNlJa992RF Pofw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=i2BmTeKd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si9524363eja.251.2020.05.13.06.42.58; Wed, 13 May 2020 06:43:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=i2BmTeKd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388037AbgEMNk7 (ORCPT + 99 others); Wed, 13 May 2020 09:40:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733282AbgEMNk7 (ORCPT ); Wed, 13 May 2020 09:40:59 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D43CC061A0C for ; Wed, 13 May 2020 06:40:59 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id s1so655151qkf.9 for ; Wed, 13 May 2020 06:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fIL0Xa30eWe4pB9L70dZk7zOy9oguvU9qefI9I02W/c=; b=i2BmTeKd6lucjvyoSCAFMWyWiKtK5PqHOl8WxIU7LwH2Vzirg7cKvwtklgHFjs9XYL gKWcWITZYNWJq6Kz3QN810QJuIZMKG2gZAmtnmk/XazYBWLXY588/FsRg4B8e/cTube4 XCeidULijY2gMsBEBBArZLUC+YUCtFi+L+loMPlhmVVCwZdUvXPoabDzIgMthLHDRrO8 DTCbLPaQOz242IQtcKjGdm8i7E3NiiiuvFXf0NIJ5lH333lM6UrUA+c97oaqewkON1pA 6CatSmJ5gSSHFce1ZfZjkyA3EbIvPqJ6uBLSLH6VE5VOJHENMMhoa8EQ/N9XeyEsIhcn oNEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fIL0Xa30eWe4pB9L70dZk7zOy9oguvU9qefI9I02W/c=; b=OiqnY+nvZ7dZz+v73CjPpmdIcGluglKoLLn5zLmfuvnzbOhSd1JxRyq4mwsbCKFMGx Vp3KOZsYJ8P+b/qEpY/pnoPbjCssMG3LUbi+z7BQ9mQcAMW3rncmP1kx5Wf1QDO8bi7R qWGqbAEFaDeO0Ub+IlcmKCscWvi3+MGFBlgl/qT7Hq3BL4oYRcf0hfMjBPNYC7B4gc+B doMFjbP3jmS4PCiuoBORTHrhOeD6o/5tu0G3TU9SQDcGiDPfeWrDjIsFPVbwDfjLHRSx zY5c//ngGm74w6lCn2VyvOeid/FWgeJ30fg5EMgBMEVFDF6od0RskbOthpYjUZ30bbAH 7+8g== X-Gm-Message-State: AGi0PuaBbZ6V/5EvaxT/c84hoDiJkwfcIYg8ZS24QQOzMsrKRTG2EfKc cX6Tfoym6+WbIIhWgOHPhNhWRQ== X-Received: by 2002:a37:7302:: with SMTP id o2mr26009358qkc.474.1589377258319; Wed, 13 May 2020 06:40:58 -0700 (PDT) Received: from ovpn-66-156.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id q2sm14044106qkn.116.2020.05.13.06.40.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2020 06:40:57 -0700 (PDT) From: Qian Cai To: mpe@ellerman.id.au Cc: paulus@samba.org, benh@kernel.crashing.org, catalin.marinas@arm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH] powerpc/xive: silence kmemleak false positives Date: Wed, 13 May 2020 09:40:46 -0400 Message-Id: <20200513134046.1089-1-cai@lca.pw> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org opal_xive_donate_page() will reference the newly allocated memory using __pa(). Since kmemleak is unable to track the physical memory resulting in false positives, silence those by using kmemleak_ignore(). unreferenced object 0xc000201b53e90000 (size 65536): comm "qemu-kvm", pid 124557, jiffies 4295650285 (age 364.370s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000acc2fb77>] xive_native_alloc_vp_block+0x168/0x210 xive_native_provision_pages at arch/powerpc/sysdev/xive/native.c:645 (inlined by) xive_native_alloc_vp_block at arch/powerpc/sysdev/xive/native.c:674 [<000000004d5c7964>] kvmppc_xive_compute_vp_id+0x20c/0x3b0 [kvm] [<0000000055317cd2>] kvmppc_xive_connect_vcpu+0xa4/0x4a0 [kvm] [<0000000093dfc014>] kvm_arch_vcpu_ioctl+0x388/0x508 [kvm] [<00000000d25aea0f>] kvm_vcpu_ioctl+0x15c/0x950 [kvm] [<0000000048155cd6>] ksys_ioctl+0xd8/0x130 [<0000000041ffeaa7>] sys_ioctl+0x28/0x40 [<000000004afc4310>] system_call_exception+0x114/0x1e0 [<00000000fb70a873>] system_call_common+0xf0/0x278 Signed-off-by: Qian Cai --- arch/powerpc/sysdev/xive/native.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native.c index 5218fdc4b29a..2d19f28967a6 100644 --- a/arch/powerpc/sysdev/xive/native.c +++ b/arch/powerpc/sysdev/xive/native.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -647,6 +648,9 @@ static bool xive_native_provision_pages(void) pr_err("Failed to allocate provisioning page\n"); return false; } + /* Kmemleak is unable to track the physical address. */ + kmemleak_ignore(p); + opal_xive_donate_page(chip, __pa(p)); } return true; -- 2.21.0 (Apple Git-122.2)