[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240805175932.GB1564@sol.localdomain>
Date: Mon, 5 Aug 2024 10:59:32 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Thorsten Blum <thorsten.blum@...lux.com>
Cc: herbert@...dor.apana.org.au, davem@...emloft.net, kees@...nel.org,
gustavoars@...nel.org, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] crypto: chacha20poly1305 - Annotate struct
chachapoly_ctx with __counted_by()
On Mon, Aug 05, 2024 at 07:52:38PM +0200, Thorsten Blum wrote:
> struct poly_req {
> @@ -611,8 +611,8 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb,
> poly->base.cra_priority) / 2;
> inst->alg.base.cra_blocksize = 1;
> inst->alg.base.cra_alignmask = chacha->base.cra_alignmask;
> - inst->alg.base.cra_ctxsize = sizeof(struct chachapoly_ctx) +
> - ctx->saltlen;
> + inst->alg.base.cra_ctxsize = struct_size_t(struct chachapoly_ctx, salt,
> + ctx->saltlen);
What was wrong with the more straightforward code it had before?
- Eric
Powered by blists - more mailing lists