From patchwork Sun Apr 2 19:19:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?T25kcmVqIE1vc27DocSNZWs=?= X-Patchwork-Id: 9658557 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0AB4602F0 for ; Sun, 2 Apr 2017 19:20:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1A8A28307 for ; Sun, 2 Apr 2017 19:20:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6C0E2841D; Sun, 2 Apr 2017 19:20:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 813EB28307 for ; Sun, 2 Apr 2017 19:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751700AbdDBTUi (ORCPT ); Sun, 2 Apr 2017 15:20:38 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35826 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbdDBTUf (ORCPT ); Sun, 2 Apr 2017 15:20:35 -0400 Received: by mail-wr0-f196.google.com with SMTP id p52so28280990wrc.2 for ; Sun, 02 Apr 2017 12:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mCBEIyigvQ9/59RVYgVxfNzzYX3lXCXEvxmpln0hOXo=; b=h4euj1RUy1FtAX0wPXyC7Pne5Lc4D+oddQRUlvqZ0QM8o/9+rP1xXPky29Hu3YG7mE Dg2nwTgLREGymbC6ZNF/haAYu67/whbuSyTe5k0kkNUgUrUJ8NCWuJYyvad3IQXmgNgD 2ha/rnZoeCyW0urNXpX5IYZkbd0LhvzbZ7wBpWAv4AKy7nL65Ejyx9dzJZ4etbgUd0Lv 9VXnF+9Smox7Piz55v8AJGP4zBNIsbjUQz4yqzLKItVkYLfhJ2VKk3Y2fnG9Kp3utxPO fOWZgLRjf1BbEZ2zsfsg7yGmhpysk7xhZmRyE6u/iONs8VJMycxmXnzgo/NnnE7xtPNt GZ4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mCBEIyigvQ9/59RVYgVxfNzzYX3lXCXEvxmpln0hOXo=; b=P8isip4wUPGs41nNkG7rWPOROI7FJbHtIuoCLCCJbcDx3SngXFhuHomXLb5fDcN0J3 oQNcPxUE1F4noaCZSw4kRdBW44NvHMLD5y5NsPSSz2t3Tth5huQwX6V5XCbHxdm1Z+tr vrkg3wljXoXcfbjSGWGcqQ9Gw2KlPDEgZK1/qOSRf11a8pze9EL68d4WHQcfxSlNt5Zh i2Abda4wxh/zrJ9jHStItt/poc7MBlQkst6NDlCTpuT8joZWVCEwCO3zst2hvlPLJ9Xn VDdy2snxVyA1WR19glkv6sdbLZEd9wmTekZD5SKKUrPd+1sO6uxcJepAJHSEVspGWmMT 33qA== X-Gm-Message-State: AFeK/H2PJRaZyjjyP3vywzriQ1MGq3z7lYBXS6Z0h5sQthpVEKnEvPt9xMKZPTLyk6Zxsw== X-Received: by 10.28.229.78 with SMTP id c75mr7084265wmh.20.1491160833634; Sun, 02 Apr 2017 12:20:33 -0700 (PDT) Received: from localhost.localdomain (bband-dyn32.178-41-80.t-com.sk. [178.41.80.32]) by smtp.gmail.com with ESMTPSA id g63sm11367604wme.11.2017.04.02.12.20.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 12:20:32 -0700 (PDT) From: Ondrej Mosnacek To: Herbert Xu Cc: Ondrej Mosnacek , "David S. Miller" , linux-crypto@vger.kernel.org, Eric Biggers , Milan Broz Subject: [PATCH v5 3/4] crypto: glue_helper - remove the le128_gf128mul_x_ble function Date: Sun, 2 Apr 2017 21:19:15 +0200 Message-Id: <20170402191916.9309-4-omosnacek@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170402191916.9309-1-omosnacek@gmail.com> References: <20170402191916.9309-1-omosnacek@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The le128_gf128mul_x_ble function in glue_helper.h is now obsolete and can be replaced with the gf128mul_x_ble function from gf128mul.h. Signed-off-by: Ondrej Mosnacek --- arch/x86/crypto/glue_helper.c | 3 ++- arch/x86/include/asm/crypto/glue_helper.h | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/x86/crypto/glue_helper.c b/arch/x86/crypto/glue_helper.c index 260a060..24ac9fa 100644 --- a/arch/x86/crypto/glue_helper.c +++ b/arch/x86/crypto/glue_helper.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -457,7 +458,7 @@ void glue_xts_crypt_128bit_one(void *ctx, u128 *dst, const u128 *src, le128 *iv, le128 ivblk = *iv; /* generate next IV */ - le128_gf128mul_x_ble(iv, &ivblk); + gf128mul_x_ble(iv, &ivblk); /* CC <- T xor C */ u128_xor(dst, src, (u128 *)&ivblk); diff --git a/arch/x86/include/asm/crypto/glue_helper.h b/arch/x86/include/asm/crypto/glue_helper.h index 29e53ea..ed8b66d 100644 --- a/arch/x86/include/asm/crypto/glue_helper.h +++ b/arch/x86/include/asm/crypto/glue_helper.h @@ -125,16 +125,6 @@ static inline void le128_inc(le128 *i) i->b = cpu_to_le64(b); } -static inline void le128_gf128mul_x_ble(le128 *dst, const le128 *src) -{ - u64 a = le64_to_cpu(src->a); - u64 b = le64_to_cpu(src->b); - u64 _tt = ((s64)a >> 63) & 0x87; - - dst->a = cpu_to_le64((a << 1) ^ (b >> 63)); - dst->b = cpu_to_le64((b << 1) ^ _tt); -} - extern int glue_ecb_crypt_128bit(const struct common_glue_ctx *gctx, struct blkcipher_desc *desc, struct scatterlist *dst,