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: 804330 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xc3jh1ZrFz9sNd for ; Tue, 22 Aug 2017 18:33:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jUWWJIRN"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xc3jh0SDgzDqY9 for ; Tue, 22 Aug 2017 18:33:28 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jUWWJIRN"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xc3CZ4GQ8zDqm7 for ; Tue, 22 Aug 2017 18:10:50 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jUWWJIRN"; dkim-atps=neutral Received: by mail-wr0-x241.google.com with SMTP id k10so8622816wre.5 for ; Tue, 22 Aug 2017 01:10:50 -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=i5XLjGQpK7tyi0THlq2hQS2MiUiQbCbQwy3UHRnGMkgV44f2izXTaRgkTqWZla/wM/ teOe9VTDFIx27m33YgOqlAsE/V+D3IlBPm57M/YhVj9JG0fIH78dz32bmWdLuVMDeumy Q+Ouf4xJMrMrHsoRQmFTViUuSJlqG+BVaG/Fw0M0hRznIn0XDlfZLojFzIvKfZKRiunk 3nyAZbm37wX1YmmQ8OX0uQp+4YSA5awPrkhZEy7ttbDh9mG1dIxa/oK5xtPZ0bWoX9Vb RUGHeninNfjDP3wu0BjZa5ZWmkL7ZtuBaTIq/9PomH9orJVMqHvuFNCK4gGz9NDuZUzL BWrA== X-Gm-Message-State: AHYfb5hndmyd7GrszHG3n6Rm2msR6pW3dCueT6CwF2aRJvQmdBB3uxLh lc6ptuD06sGVLA== 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List 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 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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)",