Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1802227ybk; Mon, 11 May 2020 04:45:36 -0700 (PDT) X-Google-Smtp-Source: APiQypLcg1+Cy3dCOqY6NlfnqjnajJBWN6WNtKUiVGTm6xg3KSbw87+L52zChsGKq6g1PdnGQGas X-Received: by 2002:a17:906:9a1:: with SMTP id q1mr12786254eje.296.1589197536468; Mon, 11 May 2020 04:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589197536; cv=none; d=google.com; s=arc-20160816; b=i++2ecTprRREGp0npwyiOyEIbKW7k+crhOC5EmgQzciY4H3kcroKfUVM3ikCw6aezW PpIei++c3XEP3/zrq45R062gKJS7W3/bqpT7UdsQPRowRcHNRyMDUv9Cc6blAd+YpmIh 9Eyg1Iq2+q9gnpiwwA/+NvNT0YfpQVQcYvEOCnSwcvY1ea3jgS7WELqY2I6STigoi2AN q/2WLPwJb4hbTEsnkiQf2bEBugFiQvAOYrXHILHD2v9Ug2NxyexRuydXbgJ5t5bVvEEQ p0dFEGrB9wAYv7NGKkJesczjBFleF5A4VhGssSxLE+ZX9E1TjswOLepPFswPQUL4IdSN PYuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=HrZSofo3iZFTh2jWDrYHo1noV2+xdcUG6DMvzbqh4qg=; b=0NBoX0+SsiNWrXVPvUVA8ghbYCUeHdJO8bT3z1Z26yI6VxabjS1DfY/Kq0eCuDRFuC tsN5fOH4v3ULziRLWfulJWK9W3kNgFS4qBxhf6eSnVqStPg1bL6mWO/RppTJAP2IXC8L sGwXd5KesTSJBvCcjb6F2z+xgcWV10kaYQM9jWa/a13g50ulVqpFg4MDfeiCS6EED6nL M27nFz0mllTuQsloKSErDYOdzy6UNsV7ekNZwk5t8FpcoUbFi3FXtkx08PROCnzZ72hN V4HF1/FhDFqXHonqv0AiNq0Mky/PSfNiFpWcGFxKoISvjQlh1BZ9oVKF1K9EwPQh6fgl XAYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=kuJu9lu9; 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 cc27si7017213edb.544.2020.05.11.04.45.12; Mon, 11 May 2020 04:45:36 -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=kuJu9lu9; 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 S1729476AbgEKLne (ORCPT + 99 others); Mon, 11 May 2020 07:43:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727873AbgEKLne (ORCPT ); Mon, 11 May 2020 07:43:34 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F073EC061A0C for ; Mon, 11 May 2020 04:43:32 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id g185so9321786qke.7 for ; Mon, 11 May 2020 04:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=HrZSofo3iZFTh2jWDrYHo1noV2+xdcUG6DMvzbqh4qg=; b=kuJu9lu9imJ02yqGcj2fHwbhmZM1veTUhrSCepuKecNYH/uPA37AoMyqX/yCHUn5VA FZSSXzKY5C3OW5DnkUF3nRZIj5kkoClPt5aobsr+m9VnLbcK7JewiiXWVn8cqNiVj445 CQ702HdJvr2MxDcU9cYWWzpZT+74rc/pN7N/uKAQz1s7b7p3ra5kdn74AUboxnpB9s27 n6YkYe2I0N/dIF06LHbxtvrTxZD4Bmkn9XS+qpa02lpiDSubXN09Hnz5hVSG4D7dBsyv BXiY51kFI9ww0APazvLGzvsArPoumnWAldY7G/isso99zPnBy0QTgw9HXGXXkbaQ5VFl QHaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=HrZSofo3iZFTh2jWDrYHo1noV2+xdcUG6DMvzbqh4qg=; b=gS7078uDQJULpsJheJ2PCOVF5Pa6vPFCYHiPXM4QpRAvJshmgp1HQIieYOCC+TXolM qn4UhTL8I3U5ZX37oy4CTCltXOxIK7Ftio2fZZVJRlYtqnymHnAev6Xy8M7hvf4Z2hbw oyDA/2GfISVTojUxmrPtudwueJg0DRzpJMV36hvMNqbuR2njN1GBJTo6A36V3cSYlgPZ YmQs88GOfxQqQOUcYUnr6BuRjZ+i4ShoZ5Vph1ddH/EoIWKb325XNflDUvHWTXM1TKeW lUpAEPRJZfG/4EwYjbzPVQccgHTZ65CzIoPjpPeKJkOOq4CjH83HTmzJilx2OeGnfL7x R4eA== X-Gm-Message-State: AGi0PubIuMtrkJWrXRE+atOVKuyy7pA77R/Dc9Pt6+LeYIANyDFwfngY Zflz0KPKLsyT3PVJSRNx5HpfzUkJBq4HdA== X-Received: by 2002:a37:668b:: with SMTP id a133mr14285835qkc.488.1589197412193; Mon, 11 May 2020 04:43:32 -0700 (PDT) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id e23sm7670945qkm.63.2020.05.11.04.43.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 May 2020 04:43:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] powerpc/kvm: silence kmemleak false positives Date: Mon, 11 May 2020 07:43:30 -0400 Message-Id: <44807D44-98D9-431C-9266-08014C4B47F6@lca.pw> References: <87y2pybu38.fsf@mpe.ellerman.id.au> Cc: paulus@ozlabs.org, benh@kernel.crashing.org, catalin.marinas@arm.com, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org In-Reply-To: <87y2pybu38.fsf@mpe.ellerman.id.au> To: Michael Ellerman X-Mailer: iPhone Mail (17D50) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 11, 2020, at 7:15 AM, Michael Ellerman wrote: >=20 > There is kmemleak_alloc_phys(), which according to the docs can be used > for tracking a phys address. >=20 > Did you try that? Caitlin, feel free to give your thoughts here. My understanding is that it seems the doc is a bit misleading. kmemleak_allo= c_phys() is to allocate kmemleak objects for a physical address range, so k= memleak could scan those memory pointers within for possible referencing oth= er memory. It was only used in memblock so far, but those new memory allocat= ions here contain no reference to other memory. In this case, we have already had kmemleak objects for those memory allocati= on. It is just that other pointers reference those memory by their physical a= ddress which is a known kmemleak limitation won=E2=80=99t be able to track t= he the connection. Thus, we always use kmemleak_ignore() to not reporting th= ose as leaks and don=E2=80=99t scan those because they do not contain other m= emory reference.=