From patchwork Tue Aug 22 08:08:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9914547 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 D5B76600C5 for ; Tue, 22 Aug 2017 08:16:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD10B2881A for ; Tue, 22 Aug 2017 08:16:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1B2428829; Tue, 22 Aug 2017 08:16:38 +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=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 56A042881A for ; Tue, 22 Aug 2017 08:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=vEOacLJgEP9MWTrV9WryCbtX58hnhct6wkmzly3G0GI=; b=iAOxO6HqEezbme6hTAv8+uzZPx xFzDxG7a/P6xAGyYVyjqbijVimGAaWTFjwuZTJFFnMngJ7b/mKx4Tlph/g6dREstReAZ5u7G1x3VM inQrstMDZAGL0gEjE+zYoto5yBwD325vXFz+6ShRL1C5nk1QpB7XpYxfE1sAbyzkSNyKOhsbZ/KpZ rY8f0sCBfC+JqNlOE5zMl/69dCqd8/9V0zQjGLy/2i1O2OjIVZV4UIHU4wCSt2tJ8IzM8pYrsVFI5 5RXwZTRd/Uek4kyzmBOSFTdm5dg8vF+vIvkKJWwZ9/jMn++PgLwAFrr893eMAzs0nEnu2AW/xHxwy KaVcOFBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dk4MX-0000S1-G2; Tue, 22 Aug 2017 08:16:37 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk4HC-0001Uf-Fs; Tue, 22 Aug 2017 08:11:18 +0000 Received: by mail-wr0-x244.google.com with SMTP id k10so8622814wre.5; Tue, 22 Aug 2017 01:10:49 -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=BchXgAU1yK0A1dzSBhr7SCoHQNRQSvyuODk+fcc/0NE=; b=jUWWJIRNOToQ5ctanEMzQVeMIwF7YqQAIGVGn265exVhAGBwcbRM6n6aMDL9qjCVrf lteH8iyEsE1V1491iJUCiwl5ayZhh08ZxQyI39lkpbQlU1ltGKmvvApXc5RIXeEAu8Vt s+JN5iQv9QrqT7HgZX3VhCsAobMfvtj9McZB8W2R82CQQ67j54ur7n5nVBeOMH2qtBjO xhlGknYQZWwfol34lknfK/xdy9aUrIv/WfJe4rrYqcuPLovOdvYBpY2Y8+No9pJu5lTL Bk3yUXrGRgSADgS+JMTfTAir2iVugme7q+etTyNEJ25GwDUEWxWFXnLibrquXKCdDUIb Xixg== 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=BchXgAU1yK0A1dzSBhr7SCoHQNRQSvyuODk+fcc/0NE=; b=m1ufFOu/mnif800qKavooE+n4viBqrrCpEeiqc7dfdxwsXNVdXSUybOxnoky5BZA/f jVTdG6nweZoM5hbwuID27XD2eENE0bBsgjZL+nurE3VOW0FfZKAZIN+ipErfoSR7a72M 81qGQnLOu1mHVyRYtA6Bmwi+p99pxAGuUSSShpZIANJN5VfJsrBijyxhhrfuTVz//Hwg AyNRiyqU1yE5HuDvopwtJM369dnMcBjt+DKvnoStHnEnp8XnUxw8oBToshwy8WENXFpZ ZvDo6INOgrSzZnHaXcLXS2B9QuIinujsJxc8Kl0h8Q2D2cau9Nsvh51zI7crzvhlqzrV ylZw== X-Gm-Message-State: AHYfb5gjizdmehhaGZ6NK4n4+Jbdh+JnJ72HUl7gydWHI/RrGA1+bHCT kLU/UpPa1f4bKA== X-Received: by 10.223.183.35 with SMTP id l35mr2081219wre.266.1503389448055; Tue, 22 Aug 2017 01:10:48 -0700 (PDT) Received: from Red.local (LFbn1-1-65-78.w90-118.abo.wanadoo.fr. [90.118.156.78]) by smtp.googlemail.com with ESMTPSA id e21sm10778796wme.17.2017.08.22.01.10.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Aug 2017 01:10:47 -0700 (PDT) From: Corentin Labbe To: herbert@gondor.apana.org.au, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, horia.geanta@nxp.com, dan.douglass@nxp.com, thomas.lendacky@amd.com, gary.hook@amd.com, harsh@chelsio.com, matthias.bgg@gmail.com, leosilva@linux.vnet.ibm.com, pfsmorigo@linux.vnet.ibm.com, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au Subject: [PATCH 11/11] crypto: aesni - Use GCM IV size constant Date: Tue, 22 Aug 2017 10:08:18 +0200 Message-Id: <20170822080818.12486-12-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170822080818.12486-1-clabbe.montjoie@gmail.com> References: <20170822080818.12486-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170822_011107_053367_291C2D6F X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Corentin Labbe , linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe --- arch/x86/crypto/aesni-intel_glue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 5c15d6b57329..80664368bf14 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -1131,7 +1132,7 @@ static struct aead_alg aesni_aead_algs[] = { { .setauthsize = common_rfc4106_set_authsize, .encrypt = helper_rfc4106_encrypt, .decrypt = helper_rfc4106_decrypt, - .ivsize = 8, + .ivsize = GCM_RFC4106_IV_SIZE, .maxauthsize = 16, .base = { .cra_name = "__gcm-aes-aesni", @@ -1149,7 +1150,7 @@ static struct aead_alg aesni_aead_algs[] = { { .setauthsize = rfc4106_set_authsize, .encrypt = rfc4106_encrypt, .decrypt = rfc4106_decrypt, - .ivsize = 8, + .ivsize = GCM_RFC4106_IV_SIZE, .maxauthsize = 16, .base = { .cra_name = "rfc4106(gcm(aes))", @@ -1165,7 +1166,7 @@ static struct aead_alg aesni_aead_algs[] = { { .setauthsize = generic_gcmaes_set_authsize, .encrypt = generic_gcmaes_encrypt, .decrypt = generic_gcmaes_decrypt, - .ivsize = 12, + .ivsize = GCM_AES_IV_SIZE, .maxauthsize = 16, .base = { .cra_name = "gcm(aes)",