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 15A621EB9F2 for ; Wed, 1 Apr 2026 08:13:18 +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=1775031199; cv=none; b=t2T5pHALvvFZ0cXlCbGVmrcSr2Ls1W5M1LFS3c3QINZQQobOeMnUBpJSIRUwKzl53HAdcwvCdq7XbbJbujfJmdQ05GRBAhDMIB3MLrn9ohzFJ/++BPDmk6Kd6n430KJvlUqHo1BXCGd6X31WYOBEPrjvCZCozQeOkSrppm0Pr1Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775031199; c=relaxed/simple; bh=qFCRYDPnEz3aT77ZnK3nsCZHoQseZKYUmkQv01OgfOs=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=f8IOLzOfHxoslTg90MX/QfdCHGlDdL8Wxzv5mzxpTt71NUgqKmjQUidww6uprDXl9kKEkEGw0PLAbRQbl8voQ3OuSGfU7pzKM6xZ3WRBBGEiR/zHhaeBdAfrCVDl6H8o8EtSa0vUTk3diHwmq9+DAr4DpdL/dRiYHXoRf4U84kk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EtjFx3XX; 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="EtjFx3XX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B747C4CEF7; Wed, 1 Apr 2026 08:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775031198; bh=qFCRYDPnEz3aT77ZnK3nsCZHoQseZKYUmkQv01OgfOs=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=EtjFx3XXV8cFoL1NXtkEsMkkmpdQzFr8LCsScJD+38OmJJPaEYVl2+mlAqOQF75Wf ZNFVwsdsuej/Q/sH46k6SLpAQH+Atqxsjtue+mBuzvi3YO5hDxCDdTQzql3SMTHsTT e/SDhYMRxvXzPo/kSQeqitVt2m1EAdw8zWA/uUtCS/1CO7E8kTIGy3yDsB1VezD3VN h1NP3MWrjywmkLnYgQ1mIzcyU3M3To+GPb89LVe3AzfvgF3/kwMS8w5mPonbuVDv3X MUZJNkCTJP5Mg9tdC8ebQw0rQeCkHnOi4YnGSxkXE7OkOTTONfiDdCapuIIiw0AmfB E8bPnvR+U677A== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 1A51BF4007F; Wed, 1 Apr 2026 04:13:17 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Wed, 01 Apr 2026 04:13:17 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddviedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrugcuuehi vghshhgvuhhvvghlfdcuoegrrhgusgeskhgvrhhnvghlrdhorhhgqeenucggtffrrghtth gvrhhnpedvueehiedtvedtleekuddutefgffdtleetfeetveejveejieehfefhjeeijeef udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh guodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduieejtdehtddtjeelqdef fedvudeigeduhedqrghruggspeepkhgvrhhnvghlrdhorhhgseifohhrkhhofhgrrhgurd gtohhmpdhnsggprhgtphhtthhopeejpdhmohguvgepshhmthhpohhuthdprhgtphhtthho pegsphesrghlihgvnhekrdguvgdprhgtphhtthhopegrihhksegrmhgurdgtohhmpdhrtg hpthhtohepthhhohhmrghsrdhlvghnuggrtghkhiesrghmugdrtghomhdprhgtphhtthho pegrrhgusgdoghhithesghhoohhglhgvrdgtohhmpdhrtghpthhtohepvggsihhgghgvrh hssehkvghrnhgvlhdrohhrghdprhgtphhtthhopeigkeeisehkvghrnhgvlhdrohhrghdp rhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id C749F700065; Wed, 1 Apr 2026 04:13:16 -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: Wed, 01 Apr 2026 10:12:56 +0200 From: "Ard Biesheuvel" To: "Alexey Kardashevskiy" , "Borislav Petkov" , "Ard Biesheuvel" , "Eric Biggers" Cc: linux-kernel@vger.kernel.org, x86@kernel.org, "Tom Lendacky" Message-Id: In-Reply-To: <0f5ddb00-fffb-4efc-b04c-80624ef94675@amd.com> References: <20251010151036.42241-2-ardb+git@google.com> <20260331131655.GAacvJR18jz5J30F8p@fat_crate.local> <991d5e3b-171d-4391-8a1d-b0ca4608ae32@app.fastmail.com> <86dc5dea-2ddc-44b4-b295-d34d87f53567@amd.com> <0f5ddb00-fffb-4efc-b04c-80624ef94675@amd.com> Subject: Re: [PATCH] x86/sev: Remove bogus virtual address check Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, 1 Apr 2026, at 10:03, Alexey Kardashevskiy wrote: > On 1/4/26 18:29, Ard Biesheuvel wrote: >> On Tue, 31 Mar 2026, at 23:30, Alexey Kardashevskiy wrote: >>> On 1/4/26 00:21, Ard Biesheuvel wrote: >>>> (add Eric back to cc) >>>> >>>> Please keep Eric on cc - I added him for a reason, thanks. >>>> >>>> >>>> On Tue, 31 Mar 2026, at 15:18, Ard Biesheuvel wrote: >>>>> 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. >>>>>>> >> ... >>>>>> >>>>>> This came from: >>>>>> >>>>>> 7ffeb2fc2670 ("x86/sev: Document requirement for linear mapping >>>>>> of guest request buffers") >>> >>> Nah, this is because of db10cb9b574675402b virt: sevguest: Fix passing >>> a stack buffer as a scatterlist target >>> >> >> Is that change still needed after >> >> f3476bc77057 ("virt: sev-guest: Use AES GCM crypto library") > > huh. You're right, looks like it is not, I missed that. > >> If not, should we revert db10cb9b574675402b too? > > Nah, we do not want these structures on stack anyway (they might get > too big in the future). > >> Using the crypto API for simple operations where the algorithm is known >> at build time was always a mistake. But moving stack allocations to the >> heap just to placate a clunky API that can only be used meaningfully in >> an asynchronous manner in the first place is just pointless. > > True. > > Reviewed-by: Alexey Kardashevskiy > Tested-by: Alexey Kardashevskiy > > or should I reply with these to the original mail? > Thanks. I think it should be fine like this.