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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1907CD5BD4 for ; Thu, 21 Sep 2023 07:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D27MHjHbdJDIqY3ysS9+C16MYgRNqtpQWfO3umbs6z0=; b=TvHAHfCYTA7cwn eU1IsrTfJY6obMrQ2etjzt2ehI8hPOY7akHM4RdVnh8eAuRz7hctZJ54inbsoZZdoJlQrn88qe+x1 8wZ7yX9rfLBKDfgxfnxwprV4xNSg4TrJi2Jms9gTmC0ewh5BxcwO1FBEJjyrY4Nz28wb1OwVzZNGa YiS3rDjhNeHji6j8ZxYnSwytGn1zWmp/jyRl3PLigxjgLzBCV+xXu0al994wxkdUBQcBmk/Q31yzt 4mArOTufb2b89ZSpg4wciWBzOv2sKDIjhXToO81PwZ0ZOvX5+sZExG0GGOk6qIc5r++EUkm9gjgPb XKl2sN1cYF95nib0L7aA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qjDug-005M2h-0T; Thu, 21 Sep 2023 07:15:50 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qjDuc-005M27-37 for linux-arm-kernel@lists.infradead.org; Thu, 21 Sep 2023 07:15:48 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 4C216CE1D08; Thu, 21 Sep 2023 07:15:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7122AC433B7; Thu, 21 Sep 2023 07:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695280543; bh=Tx02dogxcOVuPJ+DWswlMoAIUz1labuHXlWuvwBTGiM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PNotydpZJebiJsWK5x0zEj2ZxGXRYyowWYd29aCMRjMrCNF+XG1/DU8Vjfrf9vbja Xp6odIA+k1f/1V4BIB98EJYWH5PCdxXO4S/BCEMtM2Nyy4s80mdEqSXK3SLHwNkSFd 1U9Hbb/LZOHBD+Rzo9o3GkqiH+fKjMFPAwgC91MTCh00CvroDgqH4XWyuZtgdIy3lx H1nwB3eOdTwCCvzpJeylIodw2LhDR2IjGDe8mTNGTK5Ig5dMslkxETpn+TTdSiA807 QSM/6JR4RJkvnE2+qQlkq2ej0hSH4qtVP95dg3pJ20IXxNL4q6zA5OskKJTgkVhMQk pBWxYrU6Uhsjw== Received: from 82-132-232-12.dab.02.net ([82.132.232.12] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qjDuW-00Erv1-Pd; Thu, 21 Sep 2023 08:15:41 +0100 Date: Thu, 21 Sep 2023 08:15:36 +0100 Message-ID: <877cok3skn.wl-maz@kernel.org> From: Marc Zyngier To: Suraj Jitindar Singh Cc: , , , , , , , , , , , Will Deacon , Quentin Perret Subject: Re: [PATCH stable 6.1.y 2/2] KVM: arm64: Prevent unconditional donation of unmapped regions from the host In-Reply-To: <20230920192729.694309-2-surajjs@amazon.com> References: <20230920192729.694309-1-surajjs@amazon.com> <20230920192729.694309-2-surajjs@amazon.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 82.132.232.12 X-SA-Exim-Rcpt-To: surajjs@amazon.com, stable@vger.kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, sjitindarsingh@gmail.com, will@kernel.org, qperret@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230921_001547_356194_C36A49D5 X-CRM114-Status: GOOD ( 16.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 20 Sep 2023 20:27:29 +0100, Suraj Jitindar Singh wrote: > > From: Will Deacon > > commit 09cce60bddd6461a93a5bf434265a47827d1bc6f upstream. > > Since host stage-2 mappings are created lazily, we cannot rely solely on > the pte in order to recover the target physical address when checking a > host-initiated memory transition as this permits donation of unmapped > regions corresponding to MMIO or "no-map" memory. > > Instead of inspecting the pte, move the addr_is_allowed_memory() check > into the host callback function where it is passed the physical address > directly from the walker. > > Cc: Quentin Perret > Fixes: e82edcc75c4e ("KVM: arm64: Implement do_share() helper for sharing memory") > Signed-off-by: Will Deacon > Signed-off-by: Marc Zyngier > Link: https://lore.kernel.org/r/20230518095844.1178-1-will@kernel.org > [ bp: s/ctx->addr/addr in __check_page_state_visitor due to missing commit > "KVM: arm64: Combine visitor arguments into a context structure" > in stable. > ] Same question. > Signed-off-by: Suraj Jitindar Singh Again, I find this backport pretty pointless. What is the rationale for it? M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel