Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2332045ybp; Thu, 10 Oct 2019 06:01:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzllQhj6vBOXimYA1tCCUni/HUcNY9ZTFB2wsJxV80enZZ6JVwT25GCiWtqsIPp9L9wIy4c X-Received: by 2002:aa7:d8c7:: with SMTP id k7mr7992764eds.138.1570712491244; Thu, 10 Oct 2019 06:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570712491; cv=none; d=google.com; s=arc-20160816; b=EZNYU8CRdwaDa32gSN/knRud66edbFfwTigh6o2vkJpuE+U7yEopCRmh0dTetFL2it 5h0qTHsfGas+8MMkiSqucrHMb1vrBeG+brKYNaA/eMJpie12sdsn0TUs2pZ+r/dGYa2z aMUhqUNepnbrOonR9CADiWu+gEXbTNDfeXlZVcBi6wAeHPNTtfQ3AL9EWFZJL2GWYZCZ oxcVoEkYbdhk2u7aTokwx746oQHJ4uA0RaL9rwmsdZGINc2XQGAM3b4lqA7bnR/BfryG ceGWpaRyTkpzuJoEO5jtMdHGonT7O2tIUDf/bmM7FPX4TkyQ4g/NwcIHwYJSd/HxS3Tv pXfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=raYAmXFzQNfKxcSZm4MWpHCymKjocvAeRn7E1HqJnMc=; b=TYnYdULxJE9ly/wxlLAYk7ZkBAaANYqHVnpxgTfAbEwv7P6vayKs2yKMBNnmpvRAW/ hKG0uXFsDESASSWzmPQbC5S3beLxUZ+vYyhTKm7IXfI52joVeszTScZDrjjdnLcIMC86 XM8OGyn5zxQyTT0DuvHOAOCGLBAThVo0bCNeFAftGCEgiepsO0FAQZTUP9hBl5/1JNWW 9tg+qnE0n4n/yPxRUjLtLg3ixGs8AJzHQdB7phzEZEsAg+zXDWXlowZpWPn/5uF+3g3m 5Ms2C47hdXoNd3QOhYuuv1Y6cFb19vBymz02W2Vg/StRD6kNFu+8MbOdGtiEaLmqFEa3 EaBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si3092982ejy.106.2019.10.10.06.01.01; Thu, 10 Oct 2019 06:01:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729045AbfJJM6d (ORCPT + 99 others); Thu, 10 Oct 2019 08:58:33 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:37690 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728274AbfJJM6d (ORCPT ); Thu, 10 Oct 2019 08:58:33 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.89 #2 (Debian)) id 1iIY1W-000218-B3; Thu, 10 Oct 2019 23:58:31 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 10 Oct 2019 23:58:25 +1100 Date: Thu, 10 Oct 2019 23:58:25 +1100 From: Herbert Xu To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, t2@gert.gr, jelledejong@powercraft.nl, ebiggers@kernel.org, florian@bezdeka.de Subject: Re: [PATCH v2] crypto: geode-aes - switch to skcipher for cbc(aes) fallback Message-ID: <20191010125825.GK31566@gondor.apana.org.au> References: <20191005091110.12556-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191005091110.12556-1-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, Oct 05, 2019 at 11:11:10AM +0200, Ard Biesheuvel wrote: > Commit 79c65d179a40e145 ("crypto: cbc - Convert to skcipher") updated > the generic CBC template wrapper from a blkcipher to a skcipher algo, > to get away from the deprecated blkcipher interface. However, as a side > effect, drivers that instantiate CBC transforms using the blkcipher as > a fallback no longer work, since skciphers can wrap blkciphers but not > the other way around. This broke the geode-aes driver. > > So let's fix it by moving to the sync skcipher interface when allocating > the fallback. At the same time, align with the generic API for ECB and > CBC by rejecting inputs that are not a multiple of the AES block size. > > Fixes: 79c65d179a40e145 ("crypto: cbc - Convert to skcipher") > Cc: # v4.20+ ONLY > Signed-off-by: Ard Biesheuvel > --- > v2: pass dst and src scatterlist in the right order > reject inputs that are not a multiple of the block size > > drivers/crypto/geode-aes.c | 57 +++++++++++--------- > drivers/crypto/geode-aes.h | 2 +- > 2 files changed, 34 insertions(+), 25 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt