All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/sev: Remove bogus virtual address check
@ 2025-10-10 15:10 Ard Biesheuvel
  2026-03-31  7:10 ` Ard Biesheuvel
  2026-03-31 13:16 ` Borislav Petkov
  0 siblings, 2 replies; 10+ messages in thread
From: Ard Biesheuvel @ 2025-10-10 15:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: x86, Ard Biesheuvel, Borislav Petkov (AMD), Tom Lendacky

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.

Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Ard Biesheuvel <ardb@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 9ae3b11754e6..c4e2de3687a9 100644
--- a/arch/x86/coco/sev/core.c
+++ b/arch/x86/coco/sev/core.c
@@ -2249,15 +2249,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.51.0.740.g6adb054d12-goog


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-04-01 12:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10 15:10 [PATCH] x86/sev: Remove bogus virtual address check 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
2026-04-01  8:12             ` Ard Biesheuvel
2026-04-01 12:16               ` Borislav Petkov

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.