mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Eric Biggers" <ebiggers@kernel.org>, linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	x86@kernel.org, "Borislav Petkov" <bp@alien8.de>,
	"Carlos López" <clopez@suse.de>,
	"Alexey Kardashevskiy" <aik@amd.com>
Subject: Re: [PATCH 2/3] x86/sev: Remove obsolete virtual address check
Date: Wed, 22 Jul 2026 12:01:43 +0200	[thread overview]
Message-ID: <6ecb06b9-2543-4155-8ddf-4d58861a1cea@app.fastmail.com> (raw)
In-Reply-To: <20260722025338.33354-3-ebiggers@kernel.org>



On Wed, 22 Jul 2026, at 04:53, Eric Biggers wrote:
> Virtual addresses used with the AES-GCM library don't have to be in the
> linear mapping.  Remove the virt_addr_valid() checks from
> snp_send_guest_request(), which were a workaround left over from when
> this code used crypto_aead, which required scatterlists.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>  arch/x86/coco/sev/core.c | 9 ---------
>  1 file changed, 9 deletions(-)
>

Link: https://lore.kernel.org/all/20251010151036.42241-2-ardb+git@google.com/


> diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c
> index 54b122f6ef96a..cc292d7c6fd1e 100644
> --- a/arch/x86/coco/sev/core.c
> +++ b/arch/x86/coco/sev/core.c
> @@ -1867,15 +1867,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 */
> -- 
> 2.55.0

  reply	other threads:[~2026-07-22 10:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  2:53 [PATCH 0/3] Remove old AES-GCM library Eric Biggers
2026-07-22  2:53 ` [PATCH 1/3] x86/sev: Use new " Eric Biggers
2026-07-22  2:53 ` [PATCH 2/3] x86/sev: Remove obsolete virtual address check Eric Biggers
2026-07-22 10:01   ` Ard Biesheuvel [this message]
2026-07-22 15:16     ` Eric Biggers
2026-07-22  2:53 ` [PATCH 3/3] lib/crypto: aesgcm: Remove old AES-GCM library Eric Biggers
2026-07-22  9:59 ` [PATCH 0/3] " Ard Biesheuvel
2026-07-22 16:03 ` Borislav Petkov
2026-07-23  6:14   ` Nikunj A. Dadhania
2026-07-30  1:37 ` Eric Biggers

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=6ecb06b9-2543-4155-8ddf-4d58861a1cea@app.fastmail.com \
    --to=ardb@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=aik@amd.com \
    --cc=bp@alien8.de \
    --cc=clopez@suse.de \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®