From patchwork Thu Mar 24 22:49:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 601843 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3qWM7s34VGz9sBG; Fri, 25 Mar 2016 09:49:45 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ajE4S-0001gH-BB; Thu, 24 Mar 2016 22:49:40 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ajE4O-0001g9-FZ for kernel-team@lists.ubuntu.com; Thu, 24 Mar 2016 22:49:36 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ajE4O-0004RD-1e for kernel-team@lists.ubuntu.com; Thu, 24 Mar 2016 22:49:36 +0000 Received: from kamal by fourier with local (Exim 4.86) (envelope-from ) id 1ajE4L-0002lD-90 for kernel-team@lists.ubuntu.com; Thu, 24 Mar 2016 15:49:33 -0700 From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/4][SRU][Wily] [stable-only] crypto: {blk, giv}cipher: Set has_setkey Date: Thu, 24 Mar 2016 15:49:32 -0700 Message-Id: <1458859772-10573-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1458839221-28249-1-git-send-email-kamal@canonical.com> References: <1458839221-28249-1-git-send-email-kamal@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Ben Hutchings Commit a1383cd86a06 ("crypto: skcipher - Add crypto_skcipher_has_setkey") was incorrectly backported to the 3.2.y and 3.16.y stable branches. We need to set ablkcipher_tfm::has_setkey in the crypto_init_blkcipher_ops_async() and crypto_init_givcipher_ops() functions as well as crypto_init_ablkcipher_ops(). Signed-off-by: Ben Hutchings Reference: http://article.gmane.org/gmane.linux.kernel.stable/169083 Signed-off-by: Kamal Mostafa --- crypto/ablkcipher.c | 1 + crypto/blkcipher.c | 1 + 2 files changed, 2 insertions(+) diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index 71b4b2e..13836be 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -459,6 +459,7 @@ static int crypto_init_givcipher_ops(struct crypto_tfm *tfm, u32 type, crt->givdecrypt = alg->givdecrypt ?: no_givdecrypt; crt->base = __crypto_ablkcipher_cast(tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize; return 0; } diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 8cc1622..79978da 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -472,6 +472,7 @@ static int crypto_init_blkcipher_ops_async(struct crypto_tfm *tfm) } crt->base = __crypto_ablkcipher_cast(tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize; return 0; }