Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7776434rwn; Wed, 14 Sep 2022 04:27:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6c3ko+nrOgsVLmAS2yG0Arm19+MeB3v7KhGMZFrCZfoftaVB62zn3GqfE7+J7xn3+gMvjb X-Received: by 2002:a17:90a:1f49:b0:202:7a55:558f with SMTP id y9-20020a17090a1f4900b002027a55558fmr4247946pjy.108.1663154833281; Wed, 14 Sep 2022 04:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663154833; cv=none; d=google.com; s=arc-20160816; b=piGKJz1qz3iIPv7AVHzZaVbqV6BJWWNQfhr7jF0hO46IItf/6JVawMFJuw9c9hZMl3 VZy+/9tAs95v6cFYvXqjdJFrZFHHUGDCz2A6cnRWr/7dZt/vvtthyWQ4y8h+3stwu2M8 hktRyFKRRxnK2ZRDdPJ6iAba8mmBZuNV7DRxUqQkFoRew6jWKE9Lmr1UiGwi8Az1oGST 1Y1IG3HoG2o5nOfT3gHLfuhsvw5u9YQS9yeukE1D6+h9Ngwn1NjBifqy+YW+RT4cL4as vQLNmkma7/AwrlOZkH/Qyh4zkQpfvpdh5Y3tCqBZP0aqzMOTC4Yh8RAWpAGLzYnJf80o syhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=4icdTTwMOEDl/FiFqEWnD1meNX7EE2LU8zEMLkINvBI=; b=N0H8zx4npMwmsFuGdqFYMW6OhR1vdLdfJtbaldwF6P4YWv9d0MT/+W87ia5sXx2fVP 6KyOOTGpMAPZiUYyPXy88g+N5KUJlkUCYynov1NCzbC83fr1MnTc4S5dVdFJuMIMR/lH VTHIlT8V3nn4vyZmNiyZOIPY65VJDwYcE5M9ZIhoKH9+gLMoUGKzSMlB3jqnUa3STzzK SARcAYswX5HLedyQsfDS7qoEEzhGyRp7UAfj/CahhHm86DTHdHaRRvb9g+LQVVezLpw6 HoBGW+Neeq8srOnPsis7UjgIwUkZpq2kgXCtAn9w7IzfR6c/fbd4zA2uxhkiXA8F/erm 75Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=W6EdHTzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a170902821200b00172cb948c68si14008604pln.227.2022.09.14.04.27.01; Wed, 14 Sep 2022 04:27:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=W6EdHTzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229679AbiINLI0 (ORCPT + 99 others); Wed, 14 Sep 2022 07:08:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiINLIY (ORCPT ); Wed, 14 Sep 2022 07:08:24 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09F465D104 for ; Wed, 14 Sep 2022 04:08:19 -0700 (PDT) Date: Wed, 14 Sep 2022 12:08:15 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1663153697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4icdTTwMOEDl/FiFqEWnD1meNX7EE2LU8zEMLkINvBI=; b=W6EdHTzE6hL8xf2xCXTgPfAWhGW726ekqZCMjg7k35lyEBz7Tt3ZmzHp0iwg7+fHlaXFD6 dahkLcn8Jn4N+5PEv8i7exrmNXbsNqkC/YGp9Dh5q1LGzRfEanP4LFGy9xYjWbimwNLn43 LcJIWApPaRoNmrdDX3GsRJLYLkQNYHs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Zenghui Yu Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, wanghaibin.wang@huawei.com, pbonzini@redhat.com Subject: Re: [PATCH] KVM: arm64: Use kmemleak_free_part_phys() to unregister hyp_mem_base Message-ID: References: <20220908130659.2021-1-yuzenghui@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220908130659.2021-1-yuzenghui@huawei.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 08, 2022 at 09:06:59PM +0800, Zenghui Yu wrote: > With commit 0c24e061196c ("mm: kmemleak: add rbtree and store physical > address for objects allocated with PA"), kmemleak started to put the > objects allocated with physical address onto object_phys_tree_root tree. > The kmemleak_free_part() therefore no longer worked as expected on > physically allocated objects (hyp_mem_base in this case) as it attempted to > search and remove things in object_tree_root tree. > > Fix it by using kmemleak_free_part_phys() to unregister hyp_mem_base. This > fixes an immediate crash when booting a KVM host in protected mode with > kmemleak enabled. > > Signed-off-by: Zenghui Yu Reviewed-by: Oliver Upton Marc or Paolo, do one of you want to pick this patch up? Looks like a good fix. -- Thanks, Oliver