[gnutls-devel] GnuTLS | Add Linux kernel AF_ALG backend (!1404)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Apr 14 09:48:51 CEST 2021




Stephan Mueller started a new discussion on lib/accelerated/afalg.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1404#note_551242922

> +				goto end;
> +			}
>  		}
>  	}
>  
> +	outbuflen = kcapi_aead_outbuflen_enc(ctx->handle, plain_size,
> +										 auth_size, tag_size);
> +	inbuflen = kcapi_aead_inbuflen_enc(ctx->handle, plain_size,
> +										 auth_size, tag_size);
> +
>  	/*
>  	 * Set AAD: IOVECs do not support const, this buffer is guaranteed to be
>  	 * read-only
>  	 */
> -	iov[0].iov_base = (void *)auth;
> +	memcpy(authtmp, auth, auth_size);

Why do you think the memcpy is needed here? The kernel should only read the buffer

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1404#note_551242922
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210414/832b63db/attachment.html>


More information about the Gnutls-devel mailing list