Re: [PATCH 2/3] x86/sev: Remove obsolete virtual address check

"Ard Biesheuvel" <[email protected]>
Newsgroups org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

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 <[email protected]>
> ---
>  arch/x86/coco/sev/core.c | 9 ---------
>  1 file changed, 9 deletions(-)
>

Link: https://lore.kernel.org/all/[email protected]/


> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.