Re: [PATCH] dm-verity: hash blocks with shash import+finup when possible

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

 



Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
>
> +       driver_name = crypto_ahash_driver_name(ahash);
> +       if (v->version >= 1 /* salt prepended, not appended? */ &&
> +           1 << v->data_dev_block_bits <= PAGE_SIZE) {
> +               shash = crypto_alloc_shash(alg_name, 0, 0);

I'm sorry but this is disgusting.

Can't we do the same optimisation for the ahash import+finup path?

On a side note, if we're going to use shash for bulk data then we
should reintroduce the can/cannot sleep flag.

Cheers,
-- 
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]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux