mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@amd.com>
To: Ard Biesheuvel <ardb@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Ard Biesheuvel <ardb+git@google.com>,
	Eric Biggers <ebiggers@kernel.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [PATCH] x86/sev: Remove bogus virtual address check
Date: Wed, 1 Apr 2026 19:03:21 +1100	[thread overview]
Message-ID: <0f5ddb00-fffb-4efc-b04c-80624ef94675@amd.com> (raw)
In-Reply-To: <d80a4e69-2a01-499e-bb16-6db415bb1b94@app.fastmail.com>



On 1/4/26 18:29, Ard Biesheuvel wrote:
> [ 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 <ardb@kernel.org>
>>>>>>
>>>>>> 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 <aik@amd.com>
Tested-by: Alexey Kardashevskiy <aik@amd.com>

or should I reply with these to the original mail?

Thanks,


-- 
Alexey


  reply	other threads:[~2026-04-01  8:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-10 15:10 Ard Biesheuvel
2026-03-31  7:10 ` Ard Biesheuvel
2026-03-31 13:16 ` Borislav Petkov
2026-03-31 13:18   ` Ard Biesheuvel
2026-03-31 13:21     ` Ard Biesheuvel
2026-03-31 21:30       ` Alexey Kardashevskiy
2026-04-01  7:29         ` Ard Biesheuvel
2026-04-01  8:03           ` Alexey Kardashevskiy [this message]
2026-04-01  8:12             ` Ard Biesheuvel
2026-04-01 12:16               ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f5ddb00-fffb-4efc-b04c-80624ef94675@amd.com \
    --to=aik@amd.com \
    --cc=ardb+git@google.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=ebiggers@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome