[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181211092606.il7a2gc4jlsnij3n@gondor.apana.org.au>
Date: Tue, 11 Dec 2018 17:26:06 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Christophe Leroy <christophe.leroy@....fr>
Cc: "David S. Miller" <davem@...emloft.net>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK
On Tue, Dec 11, 2018 at 07:29:40AM +0000, Christophe Leroy wrote:
>
> diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
> index 6988012deca4..385ec970b639 100644
> --- a/drivers/crypto/talitos.c
> +++ b/drivers/crypto/talitos.c
> @@ -1668,8 +1668,11 @@ static struct talitos_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request *
> struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
> unsigned int ivsize = crypto_ablkcipher_ivsize(cipher);
>
> + if (ivsize)
> + memcpy(ctx->iv, areq->info, ivsize);
The ctx is per-tfm, not per-request. So you cannot write to it.
This needs to go into a pre-request area.
> return talitos_edesc_alloc(ctx->dev, areq->src, areq->dst,
> - areq->info, 0, areq->nbytes, 0, ivsize, 0,
> + ctx->iv, 0, areq->nbytes, 0, ivsize, 0,
> areq->base.flags, encrypt);
> }
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists