All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, "Ard Biesheuvel" <ardb@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>,
	"Eric Biggers" <ebiggers@kernel.org>
Subject: [PATCH 2/3] x86/sev: Remove obsolete virtual address check
Date: Tue, 21 Jul 2026 19:53:37 -0700	[thread overview]
Message-ID: <20260722025338.33354-3-ebiggers@kernel.org> (raw)
In-Reply-To: <20260722025338.33354-1-ebiggers@kernel.org>

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(-)

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


  parent reply	other threads:[~2026-07-22  2:57 UTC|newest]

Thread overview: 6+ 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 ` Eric Biggers [this message]
2026-07-22 10:01   ` [PATCH 2/3] x86/sev: Remove obsolete virtual address check Ard Biesheuvel
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

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=20260722025338.33354-3-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=aik@amd.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=clopez@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.