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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA1A9E7D0AA for ; Thu, 21 Sep 2023 21:02:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232434AbjIUVCO (ORCPT ); Thu, 21 Sep 2023 17:02:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230016AbjIUVBt (ORCPT ); Thu, 21 Sep 2023 17:01:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 961967B46D; Thu, 21 Sep 2023 10:37:11 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FB1CC43397; Thu, 21 Sep 2023 07:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695280460; bh=sbkMaObnKRwmPdGiHp5t8tLUVEh68i9Dek5db4bGsRI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=otAknR7kPOaMqD/Ihsj4qYdxAt3lmU1INGuf7Ggozz7L5M7AkgAYnmqwQBVvrK2JY cp0h77ns9QvRutZwtn6j8H+twS6B1HitnWufCR4xfKx5+XJKy9Ae9szfB41ChjkTef E60nsJFZLkS+jYeAQtpYLjnSungfyh9OAmpL+nJgrgnJ1M88B1XCIex6+DayWE6ChJ D1Xwh0035idybMDFBLwiW/QdGMnqQzRh4jmbKOUb98NU1TI9EqdbRWhXeYUPenQwaB M2kHK4KyX3YJvYLT9VJgBj5q097fSTZEKbzfdPFD3bnWX3xqZsC43tIdY0vvSq9z9F BCgMr4/nd71IA== 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 1qjDsl-00ErtX-Dv; Thu, 21 Sep 2023 08:14:17 +0100 Date: Thu, 21 Sep 2023 08:13:40 +0100 Message-ID: <878r903snv.wl-maz@kernel.org> From: Marc Zyngier To: Suraj Jitindar Singh Cc: , , , , , , , , , , , Quentin Perret , Philippe =?UTF-8?B?TWF0aGlldS1EYXVkw6k=?= , Vincent Donnefort , Will Deacon Subject: Re: [PATCH stable 6.1.y 1/2] KVM: arm64: Prevent the donation of no-map pages In-Reply-To: <20230920192729.694309-1-surajjs@amazon.com> References: <20230920192729.694309-1-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") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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, qperret@google.com, philmd@linaro.org, vdonnefort@google.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Sep 2023 20:27:28 +0100, Suraj Jitindar Singh wrote: >=20 > From: Quentin Perret >=20 > commit 43c1ff8b75011bc3e3e923adf31ba815864a2494 upstream. >=20 > Memory regions marked as "no-map" in the host device-tree routinely > include TrustZone carev-outs and DMA pools. Although donating such pages > to the hypervisor may not breach confidentiality, it could be used to > corrupt its state in uncontrollable ways. To prevent this, let's block > host-initiated memory transitions targeting "no-map" pages altogether in > nVHE protected mode as there should be no valid reason to do this in > current operation. >=20 > Thankfully, the pKVM EL2 hypervisor has a full copy of the host's list > of memblock regions, so we can easily check for the presence of the > MEMBLOCK_NOMAP flag on a region containing pages being donated from the > host. >=20 > Reviewed-by: Philippe Mathieu-Daud=C3=A9 > Tested-by: Vincent Donnefort > Signed-off-by: Quentin Perret > Signed-off-by: Will Deacon > Signed-off-by: Marc Zyngier > Link: https://lore.kernel.org/r/20221110190259.26861-8-will@kernel.org > [ bp: clean ] What is this? > Signed-off-by: Suraj Jitindar Singh What is the rationale for backporting this? It wasn't tagged as Cc: to stable for a reason: pKVM isn't functional upstream, and won't be for the next couple of cycles *at least*. So at it stands, I'm against such a backport. Thanks, M. --=20 Without deviation from the norm, progress is not possible.