Re: [PATCH v9 3/7] md: dm-crypt: switch to ESSIV crypto API template

2019-08-11 Thread Ard Biesheuvel
On Mon, 12 Aug 2019 at 09:33, Milan Broz wrote: > > Hi, > > On 10/08/2019 11:40, Ard Biesheuvel wrote: > > Replace the explicit ESSIV handling in the dm-crypt driver with calls > > into the crypto API, which now possesses the capability to perform > > this processing within the crypto subsystem. >

Re: [PATCH v9 3/7] md: dm-crypt: switch to ESSIV crypto API template

2019-08-11 Thread Milan Broz
Hi, On 10/08/2019 11:40, Ard Biesheuvel wrote: > Replace the explicit ESSIV handling in the dm-crypt driver with calls > into the crypto API, which now possesses the capability to perform > this processing within the crypto subsystem. > > Signed-off-by: Ard Biesheuvel > --- > drivers/md/Kconfig

Re: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-08-11 Thread Herbert Xu
On Sun, Aug 11, 2019 at 09:29:38PM +, Pascal Van Leeuwen wrote: > > It will very likely fail with that CAAM h/w, but that only proves that you > should not use plain64be IV's together with CAAM h/w. Which should be It doesn't matter whether it's wrong or not. The fact is that this is an inter

RE: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-08-11 Thread Pascal Van Leeuwen
> -Original Message- > From: Ard Biesheuvel > Sent: Monday, August 12, 2019 12:24 AM > To: Pascal Van Leeuwen > Cc: Horia Geanta ; Herbert Xu > ; Milan Broz > ; dm-devel@redhat.com; linux-cry...@vger.kernel.org > Subject: Re: [dm-devel] xts fuzz testing and lack of ciphertext stealing >

Re: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-08-11 Thread Ard Biesheuvel
On Mon, 12 Aug 2019 at 00:15, Pascal Van Leeuwen wrote: > > > -Original Message- > > From: Ard Biesheuvel > > Sent: Saturday, August 10, 2019 6:40 AM > > To: Pascal Van Leeuwen > > Cc: Horia Geanta ; Herbert Xu > > ; Milan Broz > > ; dm-devel@redhat.com; linux-cry...@vger.kernel.org > >

RE: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-08-11 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Sunday, August 11, 2019 10:34 PM > To: Milan Broz > Cc: Ard Biesheuvel ; Pascal Van Leeuwen > ; dm-devel@redhat.com; Herbert Xu > ; > Horia Geanta ; linux-cry...@vger.kernel.org > Subject: Re: [dm-devel] xts fuzz testing and lack of ciphe

RE: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-08-11 Thread Pascal Van Leeuwen
> -Original Message- > From: Milan Broz > Sent: Sunday, August 11, 2019 1:13 PM > To: Ard Biesheuvel ; Pascal Van Leeuwen > > Cc: Horia Geanta ; Herbert Xu > ; dm- > de...@redhat.com; linux-cry...@vger.kernel.org > Subject: Re: [dm-devel] xts fuzz testing and lack of ciphertext stealing

RE: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-08-11 Thread Pascal Van Leeuwen
> -Original Message- > From: Ard Biesheuvel > Sent: Saturday, August 10, 2019 6:40 AM > To: Pascal Van Leeuwen > Cc: Horia Geanta ; Herbert Xu > ; Milan Broz > ; dm-devel@redhat.com; linux-cry...@vger.kernel.org > Subject: Re: [dm-devel] xts fuzz testing and lack of ciphertext stealing

Re: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-08-11 Thread Eric Biggers
On Sun, Aug 11, 2019 at 01:12:56PM +0200, Milan Broz wrote: > On 10/08/2019 06:39, Ard Biesheuvel wrote: > > Truncated IVs are a huge issue, since we already expose the correct > > API via AF_ALG (without any restrictions on how many of the IV bits > > are populated), and apparently, if your AF_ALG

Re: dm writecache: add unlikely for getting two block with same LBA

2019-08-11 Thread Mikulas Patocka
On Mon, 12 Aug 2019, Huaisheng Ye wrote: > From: Huaisheng Ye > > In function writecache_writeback, entries g and f has same original > sector only happens at entry f has been committed, but entry g has > NOT yet. > > The probability of this happening is very low in the following > 256 bloc

Re: dm writecache: remove unused member pointer in writeback_struct

2019-08-11 Thread Mikulas Patocka
On Mon, 12 Aug 2019, Huaisheng Ye wrote: > From: Huaisheng Ye > > The stucture member pointer page in writeback_struct never has been > used actually. Remove it. > > Signed-off-by: Huaisheng Ye Acked-by: Mikulas Patocka > --- > drivers/md/dm-writecache.c | 1 - > 1 file changed, 1 delet

dm writecache: add unlikely for getting two block with same LBA

2019-08-11 Thread Huaisheng Ye
From: Huaisheng Ye In function writecache_writeback, entries g and f has same original sector only happens at entry f has been committed, but entry g has NOT yet. The probability of this happening is very low in the following 256 blocks at most of entry e, so add unlikely for the result. Signe

dm writecache: remove unused member pointer in writeback_struct

2019-08-11 Thread Huaisheng Ye
From: Huaisheng Ye The stucture member pointer page in writeback_struct never has been used actually. Remove it. Signed-off-by: Huaisheng Ye --- drivers/md/dm-writecache.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index 1cb137f..

Re: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-08-11 Thread Milan Broz
On 10/08/2019 06:39, Ard Biesheuvel wrote: > Truncated IVs are a huge issue, since we already expose the correct > API via AF_ALG (without any restrictions on how many of the IV bits > are populated), and apparently, if your AF_ALG request for xts(aes) > happens to be fulfilled by the CAAM driver a