Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-23 Thread Mark Brown
On Fri, Jul 20, 2018 at 09:23:15PM +0900, Ard Biesheuvel wrote: > On 20 July 2018 at 20:45, Mark Brown wrote: > > I have to confess I didn't look at their in tree driver, looking briefly > > now it looks awfully like the hardware should be able to chain IV > > generation together with encryption

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-22 Thread Ard Biesheuvel
On 22 July 2018 at 22:39, Gilad Ben-Yossef wrote: > Hi there, > > Sorry for delay in response - the patch set was sent just as we shut > down the office for moving to a new location... :-) > > On Fri, Jul 20, 2018 at 2:45 PM, Mark Brown wrote: >> On Fri, Jul 20, 2018 at 10:02:21AM +0900, Ard Bies

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-22 Thread Gilad Ben-Yossef
Hi there, Sorry for delay in response - the patch set was sent just as we shut down the office for moving to a new location... :-) On Fri, Jul 20, 2018 at 2:45 PM, Mark Brown wrote: > On Fri, Jul 20, 2018 at 10:02:21AM +0900, Ard Biesheuvel wrote: >> On 20 July 2018 at 00:50, Mark Brown wrote:

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-20 Thread Mark Brown
On Fri, Jul 20, 2018 at 10:02:21AM +0900, Ard Biesheuvel wrote: > On 20 July 2018 at 00:50, Mark Brown wrote: > > Existing hardware can definitely do the IV generation and I believe that > > it can chain multiple sectors together though I'd need to confirm this, > > as mentioned elsewhere in the

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-20 Thread Ard Biesheuvel
On 20 July 2018 at 20:45, Mark Brown wrote: > On Fri, Jul 20, 2018 at 10:02:21AM +0900, Ard Biesheuvel wrote: >> On 20 July 2018 at 00:50, Mark Brown wrote: > >> > Existing hardware can definitely do the IV generation and I believe that >> > it can chain multiple sectors together though I'd need

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-20 Thread Mark Brown
On Thu, Jul 19, 2018 at 11:08:52PM +0900, Ard Biesheuvel wrote: > But this will only be the case if the accelerator is capable of doing > the IV generation and en/decryption of multiple contiguous sectors in > a single call. Otherwise, you are just shifting work from one layer to > the next. > So

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-20 Thread Xiongfeng Wang
Hi, On 2018/7/18 23:34, Ard Biesheuvel wrote: > On 18 July 2018 at 19:59, Arnd Bergmann wrote: >> On Wed, Jul 18, 2018 at 9:30 AM, Xiongfeng Wang >> wrote: >>> >>> I tested the performance of software implemented ciphers before and after >>> applying this patchset. The performance didn't change

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-19 Thread Ard Biesheuvel
On 20 July 2018 at 00:50, Mark Brown wrote: > On Thu, Jul 19, 2018 at 11:08:52PM +0900, Ard Biesheuvel wrote: > >> But this will only be the case if the accelerator is capable of doing >> the IV generation and en/decryption of multiple contiguous sectors in >> a single call. Otherwise, you are jus

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-19 Thread Ard Biesheuvel
On 19 July 2018 at 19:55, Xiongfeng Wang wrote: > Hi, > > On 2018/7/18 23:34, Ard Biesheuvel wrote: >> On 18 July 2018 at 19:59, Arnd Bergmann wrote: >>> On Wed, Jul 18, 2018 at 9:30 AM, Xiongfeng Wang >>> wrote: I tested the performance of software implemented ciphers before and after

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-18 Thread Ard Biesheuvel
On 18 July 2018 at 19:59, Arnd Bergmann wrote: > On Wed, Jul 18, 2018 at 9:30 AM, Xiongfeng Wang > wrote: >> >> I tested the performance of software implemented ciphers before and after >> applying this patchset. The performance didn't change much except for >> slight regression when writting. Th

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-18 Thread Arnd Bergmann
On Wed, Jul 18, 2018 at 9:30 AM, Xiongfeng Wang wrote: > > I tested the performance of software implemented ciphers before and after > applying this patchset. The performance didn't change much except for > slight regression when writting. The detail information is as follows. > > The command I us

[dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-18 Thread Xiongfeng Wang
Currently, the iv generation algorithms are implemented in dm-crypt.c. This patchset moves these algorithms from the dm layer to the kernel crypto layer by implementing them as template ciphers so they can be implemented in hardware for performance. We modify the dm layer to send a whole 'bio' rath