From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 469E2C4338F for ; Mon, 2 Aug 2021 16:52:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D87D61102 for ; Mon, 2 Aug 2021 16:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232056AbhHBQw3 (ORCPT ); Mon, 2 Aug 2021 12:52:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:51838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbhHBQw2 (ORCPT ); Mon, 2 Aug 2021 12:52:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 89CCB610FF; Mon, 2 Aug 2021 16:52:17 +0000 (UTC) Date: Mon, 2 Aug 2021 17:52:14 +0100 From: Catalin Marinas To: Marc Zyngier Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Alexandru Elisei , Quentin Perret , Will Deacon , kernel-team@android.com, stable@vger.kernel.org Subject: Re: [PATCH v2 2/2] KVM: arm64: Unregister HYP sections from kmemleak in protected mode Message-ID: <20210802165214.GK18685@arm.com> References: <20210802123830.2195174-1-maz@kernel.org> <20210802123830.2195174-3-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210802123830.2195174-3-maz@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Aug 02, 2021 at 01:38:30PM +0100, Marc Zyngier wrote: > Booting a KVM host in protected mode with kmemleak quickly results > in a pretty bad crash, as kmemleak doesn't know that the HYP sections > have been taken away. This is specially true for the BSS section, > which is part of the kernel BSS section and registered at boot time > by kmemleak itself. > > Unregister the HYP part of the BSS before making that section > HYP-private. The rest of the HYP-specific data is obtained via > the page allocator or lives in other sections, none of which is > subjected to kmemleak. > > Fixes: 90134ac9cabb ("KVM: arm64: Protect the .hyp sections from the host") > Reviewed-by: Quentin Perret > Signed-off-by: Marc Zyngier > Cc: Catalin Marinas > Cc: stable@vger.kernel.org # 5.13 Reviewed-by: Catalin Marinas