From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754611AbbLJXqG (ORCPT ); Thu, 10 Dec 2015 18:46:06 -0500 Received: from mga01.intel.com ([192.55.52.88]:30312 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754477AbbLJXqD (ORCPT ); Thu, 10 Dec 2015 18:46:03 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,410,1444719600"; d="scan'208";a="838843286" Message-ID: <1449765585.3057.9.camel@schen9-desk2.jf.intel.com> Subject: Re: [PATCH v4 5/5] crypto: AES CBC multi-buffer glue code From: Tim Chen To: Herbert Xu Cc: "H. Peter Anvin" , "David S.Miller" , Stephan Mueller , Chandramouli Narayanan , Vinodh Gopal , James Guilford , Wajdi Feghali , Jussi Kivilinna , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 10 Dec 2015 08:39:45 -0800 In-Reply-To: <20151210014519.GA31692@gondor.apana.org.au> References: <1449086565.22260.15.camel@schen9-desk2.jf.intel.com> <20151209025242.GA24861@gondor.apana.org.au> <1449681794.22260.58.camel@schen9-desk2.jf.intel.com> <20151210014519.GA31692@gondor.apana.org.au> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-12-10 at 09:45 +0800, Herbert Xu wrote: > On Wed, Dec 09, 2015 at 09:23:14AM -0800, Tim Chen wrote: > > > > This is an internal algorithm. We are indeed casting the request > > to the outer ablkcipher request when we do the async cipher walk. > > The question remain: why does it have to be a blkcipher rather > than an ablkcipher? > > Cheers, The inner cipher is called synchronously from the outer layer async cipher algorithm in cbc_mb_async_ablk_decrypt via err = crypto_blkcipher_crt(child_tfm)->decrypt( &rctx->desc, req->dst, req->src, req->nbytes); or directly by mcrytpd_queue_worker via mcryptd_blkcipher_crypt. We do not allow this operation to return something like EINPROGRESS. But the walk of the scattered list is done with async walk. Thanks. Tim