From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbcFCHzd (ORCPT ); Fri, 3 Jun 2016 03:55:33 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:36149 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751545AbcFCHzb (ORCPT ); Fri, 3 Jun 2016 03:55:31 -0400 Date: Fri, 3 Jun 2016 15:54:35 +0800 From: Herbert Xu To: Baolin Wang Cc: Jens Axboe , Alasdair G Kergon , Mike Snitzer , "open list:DEVICE-MAPPER (LVM)" , David Miller , Eric Biggers , Joonsoo Kim , tadeusz.struk@intel.com, smueller@chronox.de, Masanari Iida , Shaohua Li , Dan Williams , "Martin K. Petersen" , Sagi Grimberg , Kent Overstreet , Keith Busch , Tejun Heo , Ming Lei , Mark Brown , Arnd Bergmann , linux-crypto@vger.kernel.org, linux-block@vger.kernel.org, "open list:SOFTWARE RAID (Multiple Disks) SUPPORT" , LKML Subject: Re: [RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag Message-ID: <20160603075435.GA30149@gondor.apana.org.au> References: <47e9ddd8c9ea9ad9e29c8cb027d19d8459ea1479.1464346333.git.baolin.wang@linaro.org> <20160602082606.GA15226@gondor.apana.org.au> <20160603065146.GA29953@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 03, 2016 at 03:10:31PM +0800, Baolin Wang wrote: > On 3 June 2016 at 14:51, Herbert Xu wrote: > > On Fri, Jun 03, 2016 at 02:48:34PM +0800, Baolin Wang wrote: > >> > >> If we move the IV generation into the crypto API, we also can not > >> handle every algorithm with the bulk interface. Cause we also need to > >> use different methods to map one whole bio or map one sector according > >> to the algorithm whether can support bulk mode or not. Please correct > >> me if I misunderstand your points. Thanks. > > > > Which ones can't be handled this way? > > What I mean is bulk mode and sector mode's difference is not only the > IV handling method, but also the method to map the data with > scatterlists. > Then we have two processes in dm-crypt ( crypt_convert_block() and > crypt_convert_bulk_block() ) to handle the data, so we can not handle > every algorithm with the bulk interface. As I asked, which algorithm can't you handle through the bulk interface, assuming it did all the requisite magic to generate the correct IV? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt