Re: [PATCH 07/29] crypto: skcipher - optimize initializing skcipher_walk fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
>
> @@ -326,13 +326,13 @@ int skcipher_walk_virt(struct skcipher_walk *walk,
>                return 0;
> 
>        scatterwalk_start(&walk->in, req->src);
>        scatterwalk_start(&walk->out, req->dst);
> 
> -       walk->blocksize = crypto_skcipher_blocksize(tfm);
> -       walk->ivsize = crypto_skcipher_ivsize(tfm);
> -       walk->alignmask = crypto_skcipher_alignmask(tfm);
> +       walk->blocksize = alg->base.cra_blocksize;
> +       walk->ivsize = alg->co.ivsize;
> +       walk->alignmask = alg->base.cra_alignmask;

Please do this instead:

	unsigned bs, ivs, am;

	bs = crypto_skcipher_blocksize(tfm);
	ivs = crypto_skcipher_ivsize(tfm);
	am = crypto_skcipher_alignmask(tfm);
	walk->blocksize = bs;
	walk->ivsize = ivs;
	walk->alignmask = am;

This generates the right thing for me with gcc12.

Thanks,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux