From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 275313DDDDF for ; Tue, 31 Mar 2026 13:19:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774963143; cv=none; b=OV0lVmxhXZkA3C+lncphsRcyIfcWd2B7B3Jws2kTwzLsLx0dd0bHaQbIgUeNxyMEzqLY7hrgG+PNf8V7oMcBMR80p1hmnogv/TGq3gs/vaP3EkQuW6KDDdv/5e+bYtVZlNJcOuS5nM/Ti51oqoxav4plPX/4VjljhHafptrlKV4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774963143; c=relaxed/simple; bh=4v4RcnBkBRmJfxX+5gf2CBAHzE4rSuttxeXZclHTddQ=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=sc0p6AOfiFjdesRfMUYCbspuEoZ/A9RNwrHlKG1/DILJkUCHJv+A+atgSiLcXyYH7JO5CRx75jpk1dVMw5PaoZQsst0Qh9HUAI3YVB6xJzr7Ut8mftg3Ny4ePrhX2/i6NI0OSYJzw5h7A0MlDioQHs6DXFdLXXcHD9py4KYOwj8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nHz9+cA2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nHz9+cA2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8EA2C4AF09; Tue, 31 Mar 2026 13:19:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774963142; bh=4v4RcnBkBRmJfxX+5gf2CBAHzE4rSuttxeXZclHTddQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=nHz9+cA2Zgg30be4atgx9iwPVxC6a5rDeJ7A+wo52kd+0TMNvrOAo9oA0j5SGRTxj ep81Br7KwtcFYcWgsWP+bvkEQciflJrr35deF6+3zx063mmmv/QeUCtthQKBwH4DdW v/MXVLCZZ6Jg5wdQR0CmsFzloR9WDchtCS1MyxGEtNWPD+ac8+xxdwydCu9q20U3AM Y9zf3SXpUe5NutTH4B1gDcFs6MkMzBcGmdauFdQ+NK7iHXf1MN6Uc2d+4duRLOji9k RHKjE9Jw5bkbOZALyf0IgaVdjSvAChW8FY3G2igZ63QPs2c5sX4PwjGj8iFgWD9pa8 5KbvOzdxON23g== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 99D38F40084; Tue, 31 Mar 2026 09:19:01 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Tue, 31 Mar 2026 09:19:01 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegrihhl ohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpe foggffhffvvefkjghfufgtgfesthejredtredttdenucfhrhhomhepfdetrhguuceuihgv shhhvghuvhgvlhdfuceorghruggssehkvghrnhgvlhdrohhrgheqnecuggftrfgrthhtvg hrnhepvdeuheeitdevtdelkeduudetgffftdelteefteevjeevjeeiheefhfejieejfedu necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrug domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudeijedthedttdejledqfeef vdduieegudehqdgrrhgusgeppehkvghrnhgvlhdrohhrghesfihorhhkohhfrghrugdrtg homhdpnhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep sghpsegrlhhivghnkedruggvpdhrtghpthhtoheprghikhesrghmugdrtghomhdprhgtph htthhopehthhhomhgrshdrlhgvnhgurggtkhihsegrmhgurdgtohhmpdhrtghpthhtohep rghruggsodhgihhtsehgohhoghhlvgdrtghomhdprhgtphhtthhopeigkeeisehkvghrnh gvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghr nhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 665F2700065; Tue, 31 Mar 2026 09:19:01 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: ATwkRWXiqgow Date: Tue, 31 Mar 2026 15:18:25 +0200 From: "Ard Biesheuvel" To: "Borislav Petkov" , "Ard Biesheuvel" , "Alexey Kardashevskiy" Cc: linux-kernel@vger.kernel.org, x86@kernel.org, "Tom Lendacky" Message-Id: <991d5e3b-171d-4391-8a1d-b0ca4608ae32@app.fastmail.com> In-Reply-To: <20260331131655.GAacvJR18jz5J30F8p@fat_crate.local> References: <20251010151036.42241-2-ardb+git@google.com> <20260331131655.GAacvJR18jz5J30F8p@fat_crate.local> Subject: Re: [PATCH] x86/sev: Remove bogus virtual address check Content-Type: text/plain Content-Transfer-Encoding: 7bit On Tue, 31 Mar 2026, at 15:16, Borislav Petkov wrote: > On Fri, Oct 10, 2025 at 05:10:37PM +0200, Ard Biesheuvel wrote: >> From: Ard Biesheuvel >> >> The AES-GCM crypto library operates strictly on virtual addresses, and >> never performs any H/W offload, and so calling virt_addr_valid() is not >> needed. >> >> Cc: Borislav Petkov (AMD) >> Cc: Tom Lendacky >> Signed-off-by: Ard Biesheuvel >> --- >> arch/x86/coco/sev/core.c | 9 --------- >> 1 file changed, 9 deletions(-) >> >> diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c >> index 9ae3b11754e6..c4e2de3687a9 100644 >> --- a/arch/x86/coco/sev/core.c >> +++ b/arch/x86/coco/sev/core.c >> @@ -2249,15 +2249,6 @@ int snp_send_guest_request(struct snp_msg_desc *mdesc, struct snp_guest_req *req >> u64 seqno; >> int rc; >> >> - /* >> - * enc_payload() calls aesgcm_encrypt(), which can potentially offload to HW. >> - * The offload's DMA SG list of data to encrypt has to be in linear mapping. >> - */ >> - if (!virt_addr_valid(req->req_buf) || !virt_addr_valid(req->resp_buf)) { >> - pr_warn("AES-GSM buffers must be in linear mapping"); >> - return -EINVAL; >> - } >> - >> guard(mutex)(&snp_cmd_mutex); >> >> /* Check if the VMPCK is not empty */ >> -- > > This came from: > > 7ffeb2fc2670 ("x86/sev: Document requirement for linear mapping of > guest request buffers") > > and there was some speculation about the potential of using a crypto > accelerator which wants addresses in linear mapping... > Sure, but that speculation was entirely misguided, so we can remove this again.