Re: [PATCH] dm: switch dm-verity to async hash crypto API

2017-02-06 Thread Gilad Ben-Yossef
Hi Eric, On Mon, Jan 30, 2017 at 2:28 AM, Eric Biggers wrote: ... > As for the patch, I haven't looked at it in detail, but I agree that if > dm-verity is indeed operating on sufficiently large buffers in physically > contiguous memory, then the ahash API would be better

Re: [PATCH] dm: switch dm-verity to async hash crypto API

2017-01-29 Thread Eric Biggers
On Sun, Jan 29, 2017 at 09:39:20AM +0200, Gilad Ben-Yossef wrote: > Hi Odrej, > > On Thu, Jan 26, 2017 at 1:34 PM, Ondrej Mosnáček > wrote: > > Hi Gilad, > > > > 2017-01-24 15:38 GMT+01:00 Gilad Ben-Yossef : > >> - v->tfm =

Re: [PATCH] dm: switch dm-verity to async hash crypto API

2017-01-26 Thread Ondrej Mosnáček
Hi Gilad, 2017-01-24 15:38 GMT+01:00 Gilad Ben-Yossef : > - v->tfm = crypto_alloc_shash(v->alg_name, 0, 0); > + v->tfm = crypto_alloc_ahash(v->alg_name, 0, CRYPTO_ALG_ASYNC); I believe you should pass zero as the mask here. When flags == 0 and mask ==

[PATCH] dm: switch dm-verity to async hash crypto API

2017-01-24 Thread Gilad Ben-Yossef
Use of the synchronous digest API limits dm-verity when using pure CPU based algorithm providers and rules out the use of most off CPU algorithm providers which are normally asynchronous by nature, which can speed up performance even further. This reduced performance is especially expressed