Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3745883ybi; Tue, 2 Jul 2019 12:43:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDSJligBdWimTpVaUBuG818hcvLoQ/NcpvM41d1+/+CHo8geCYN3zko94gaaHxf8ve1NZC X-Received: by 2002:a17:90a:f98a:: with SMTP id cq10mr7525025pjb.43.1562096594746; Tue, 02 Jul 2019 12:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562096594; cv=none; d=google.com; s=arc-20160816; b=f8KfeQ71z0Iyt++/hVu6vPDN/BvmFhe8fHnnDtNl0Kp9DGB8bVKDJxD7eDCqeWOqU7 JnuTAcIvUkX4z3ap8roroGZ/1tTshqjKhEOsma4ehJLcN2foytg0PUCtZ3bE3GWoZlyu b5PqipcJXnnxjpYQv3i7lXDJjKkThaAXLGwCpuXLtSerJuiD7nU8fd7rbx/DHp0YvxvK dXHK1wWTeXcK4sRuq4ir3/gQ8SIsXgFy4EN23IXusLjY9p9ecCvph4vBPuosCyysbqyi HjXjnIXFUyLdMnFozd4jLBTYWN9l7DoJYie89KiEbmgUnx1H+NLzkpK+QVHSf3G9V+/H VuiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=AD8PvOEZeWj16u5SSLkHbNcyzb21rPobxHD6kFBr7Fk=; b=seC7S5pDEcuJFmm+0r54wM8ToRGIGLYLRq3ORjsM8JIL8mLC6Y2eEjgjDdBBDQUwwJ Ok3smq6lweCe0bXOzr8Tb0wFKZXAKirImYFiNbVOm3xLjyyE+0e1FjHHBMHktfun3kSq +tNUfhT9fs+qoCqBzhqjKFE/giU7JaCNbL+BjgzvEGzzMMMglJRqj3rGMqyBlU+SgVnQ CQmfL4Debw6tekg+JMUWWblcZsMBWAaQrHX/+D9O7TcXIzJwxAsjcl2SrY572zkxac4H EfKbMSNw05eqriEtCyq/Fo++CJ9V7e2pwlLOMk3v5ThUf3+JrcETKSrPuXVQ/DbjYGK5 R8Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oKXQkqHU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f69si2991048pjg.43.2019.07.02.12.43.00; Tue, 02 Jul 2019 12:43:14 -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; dkim=pass header.i=@linaro.org header.s=google header.b=oKXQkqHU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbfGBTmu (ORCPT + 99 others); Tue, 2 Jul 2019 15:42:50 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45687 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727069AbfGBTms (ORCPT ); Tue, 2 Jul 2019 15:42:48 -0400 Received: by mail-lj1-f193.google.com with SMTP id m23so18148492lje.12 for ; Tue, 02 Jul 2019 12:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AD8PvOEZeWj16u5SSLkHbNcyzb21rPobxHD6kFBr7Fk=; b=oKXQkqHUsHz/edKeiBwZP+iX+iVXjat0a0wxD9FYSK6I34WTJH5GyBr8PLx+Lc0BqW i7Osdo+uG4VQ63D9ByGN9aD75YW9OtbSL0U77kSTqqZKJkbZhjcTNI66bGnEAetkaVsF ir/kL7d1uEZfPoC3j53N0sQSrFs+lN/ebS6OFrJbgPFWcOY9EIwaK7CTNbAP6f9EbEdT d8Naz+IAft9IASgma7UWg+rTD1V8bjU74UUlhk5uH+fmLnI/6umDv7+e9ElSEmKFquqh 35u3JVZCr9+aIRBq2f50nUO3R7BZ30AdGp+eJy95L8qIO7junMmtlz6BWpPl/NwMsmkk POBg== 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=AD8PvOEZeWj16u5SSLkHbNcyzb21rPobxHD6kFBr7Fk=; b=HQUVaQxwX10F61ykFj3biXPsUcJm4cIOLuAb+H+ftbomPFq71hsU2za4ZoUSI9FxyS YjE14mQE46HAYGkebrrL5VvnTrSsG+2Sf9d3CJsHZ2M5E7cOeE8JCjefLvf2AqH6RkdG M5E1TXqNoJkJv/NFNxEr9XHnhM+RoSzZNTU7uTUuTqXAUKa8Xh2XSKJ7o+Med7wTp0fy IrjaArN6HRMAtFAY9b94l/97+CpWUEzHO3ZQYLOsFxtO0CzPr2j2kSiXG21oFbUh2kjo To8GNZWOdRPuZmCHpz8YON89Zh5ZNw2VKwXZzbsEkVAygtlXbGZWPOV6zUroIlSIy9Yy JjmA== X-Gm-Message-State: APjAAAWBWIkjkfQuSl+HIdsoi+q3Q5sbuagB3xpGkw//j78+maUZyLEo 6ApkZhGGe38jXHdsI+YBTXyhwk0Tof1YO8wc X-Received: by 2002:a2e:9643:: with SMTP id z3mr18859184ljh.43.1562096566046; Tue, 02 Jul 2019 12:42:46 -0700 (PDT) Received: from e111045-lin.arm.com (89-212-78-239.static.t-2.net. [89.212.78.239]) by smtp.gmail.com with ESMTPSA id 24sm4475163ljs.63.2019.07.02.12.42.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 12:42:45 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, ebiggers@google.com, Ard Biesheuvel Subject: [PATCH v4 27/32] crypto: aes/generic - unexport last-round AES tables Date: Tue, 2 Jul 2019 21:41:45 +0200 Message-Id: <20190702194150.10405-28-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190702194150.10405-1-ard.biesheuvel@linaro.org> References: <20190702194150.10405-1-ard.biesheuvel@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The versions of the AES lookup tables that are only used during the last round are never used outside of the driver, so there is no need to export their symbols. Signed-off-by: Ard Biesheuvel --- crypto/aes_generic.c | 6 ++---- include/crypto/aes.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/crypto/aes_generic.c b/crypto/aes_generic.c index 426deb437f19..71a5c190d360 100644 --- a/crypto/aes_generic.c +++ b/crypto/aes_generic.c @@ -328,7 +328,7 @@ __visible const u32 crypto_ft_tab[4][256] ____cacheline_aligned = { } }; -__visible const u32 crypto_fl_tab[4][256] ____cacheline_aligned = { +static const u32 crypto_fl_tab[4][256] ____cacheline_aligned = { { 0x00000063, 0x0000007c, 0x00000077, 0x0000007b, 0x000000f2, 0x0000006b, 0x0000006f, 0x000000c5, @@ -856,7 +856,7 @@ __visible const u32 crypto_it_tab[4][256] ____cacheline_aligned = { } }; -__visible const u32 crypto_il_tab[4][256] ____cacheline_aligned = { +static const u32 crypto_il_tab[4][256] ____cacheline_aligned = { { 0x00000052, 0x00000009, 0x0000006a, 0x000000d5, 0x00000030, 0x00000036, 0x000000a5, 0x00000038, @@ -1121,9 +1121,7 @@ __visible const u32 crypto_il_tab[4][256] ____cacheline_aligned = { }; EXPORT_SYMBOL_GPL(crypto_ft_tab); -EXPORT_SYMBOL_GPL(crypto_fl_tab); EXPORT_SYMBOL_GPL(crypto_it_tab); -EXPORT_SYMBOL_GPL(crypto_il_tab); /** * crypto_aes_set_key - Set the AES key. diff --git a/include/crypto/aes.h b/include/crypto/aes.h index 0a64a977f9b3..df8426fd8051 100644 --- a/include/crypto/aes.h +++ b/include/crypto/aes.h @@ -29,9 +29,7 @@ struct crypto_aes_ctx { }; extern const u32 crypto_ft_tab[4][256] ____cacheline_aligned; -extern const u32 crypto_fl_tab[4][256] ____cacheline_aligned; extern const u32 crypto_it_tab[4][256] ____cacheline_aligned; -extern const u32 crypto_il_tab[4][256] ____cacheline_aligned; int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len); -- 2.17.1