Re: [PATCH v3 11/13] btrfs: directly call into crypto framework for checsumming

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

 



> On 30.05.2019, at 12:14, David Sterba <dsterba@xxxxxxx> wrote:
> 
> 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-6D3A446E600E@xxxxxxxxxxxxx/T/#u
> 
> The thread says otherwise. Using SHASH interface for AHASH does not
> work.

Correct, but that's not what I wrote. I suggested that you can use the ahash API
instead of the shash API.

> 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).

Yeah, you're right. I overlooked that. So the ahash API is generally not an option
in this case here.

- David



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux