On Wed, May 29, 2019 at 09:32:59PM +0200, David Gstir wrote: > If you aim for using as many of the hardware drivers as possible, > it might be better to use the ahash API, since some drivers > (eg. CAAM on NXP's i.MX) only implement that API and not shash. > Looking at crypto_ahash_init_tfm(...) in crypto/ahash.c using > drivers that implement shash through the ahash API should work > fine though. > > I just found that out myself today [1]. ;) > > - David > > [1] > https://lore.kernel.org/linux-crypto/729a4150-93a0-456b-b7ab-6d3a446e6...@sigma-star.at/T/#u
The thread says otherwise. Using SHASH interface for AHASH does not work. Besides checksumming in btrfs is called from atomic contexts so the sleeping part of the async API can't work at all (crypto_wait_req indirectly calls schedule).