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 0504338E5E1 for ; Wed, 1 Apr 2026 07:30:33 +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=1775028634; cv=none; b=YkbEkzmQ3D34hea6+B35Vp0JHD7Q69QI1FAc/4j7Zxnt/byxHm41o6StylLaOQ1ECGGmBsiIT2341V+tCZApIswXmEn0Yu4xN5G/8OEQzpltNSLM3D8OvQpQzhZmrxl9V3WISTBcVAz6Rk9hgWyK34ioAh4uoN6aY9ZyLjmreJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775028634; c=relaxed/simple; bh=eZttRY/q4rW6Tb9UmWykCBSibSKIj0tm94a3cfxCdg0=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=a2RtooAgwLJvYA+1DZVtXp0dweP8ZkTaMxKw75Ttp56+GBsmXpKYJSActRMlxTIwr2r3RLUPsYTaaYD78oUVC33gdjA1nw45vvhzJMxWTPhE5ngB2+Uk/AZrQcLRzZQui1bch16Gp1lp68LcJrSxk6WslXuo4osJhtJPMtDER3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dlaP1Y9u; 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="dlaP1Y9u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78EB5C4CEF7; Wed, 1 Apr 2026 07:30:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775028633; bh=eZttRY/q4rW6Tb9UmWykCBSibSKIj0tm94a3cfxCdg0=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=dlaP1Y9u3RLGuPllN7dDPcjNL6SXvdbeHGUuwyFk+ZvHOE7gENXZjEEU1U6GQ7tVG gywTEjRKkcmVSHmLz2lPzCwt3MDwy0g1JP5KVh0VVB0J9IwkL66kanOEBHSt/9z8ZG uDSEFHxWoRToiM0jxumbek0KZbapLG5f0vlwYTiK4k/1YTQvUdgsTsJ5qrSEJK5/jH lka3PSpf9TJ8QugTjMr0tf+5WOFMbhfKgTJjoweal7/4fhmcaXFlkev+sJ2z1R1gaG 9/FlTPDcm6ExNRamBMJSGuyRTIVE0r+fQ7QciJtzDpab78yZCepsTG0uqQ2wrUm2vY badWr411CsZeQ== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 87AB2F40068; Wed, 1 Apr 2026 03:30:32 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Wed, 01 Apr 2026 03:30:32 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddvheduucetufdoteggodetrfdotf 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 64C99700065; Wed, 1 Apr 2026 03:30:32 -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 09:29:07 +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: <86dc5dea-2ddc-44b4-b295-d34d87f53567@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> Subject: Re: [PATCH] x86/sev: Remove bogus virtual address check Content-Type: text/plain Content-Transfer-Encoding: 7bit [ replying a second time since the first one seems to have evaporated - apologies if you are seeing two replies that look vaguely but not exactly the same] 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") If not, should we revert db10cb9b574675402b too? 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.