linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: x86@kernel.org
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>,
	herbert@gondor.apana.org.au
Subject: [PATCH 14/17] crypto: Don't mark AES tables const and cacheline_aligned
Date: Thu, 21 Mar 2019 15:00:06 -0700	[thread overview]
Message-ID: <20190321220009.29334-15-andi@firstfloor.org> (raw)
In-Reply-To: <20190321220009.29334-1-andi@firstfloor.org>

From: Andi Kleen <ak@linux.intel.com>

cacheline_aligned is a special section. It cannot be const at the same
time because it's not read-only. It doesn't give any MMU protection.

If we wanted const cacheline aligned we would need to define
a new dedicated section. But I assume it's not really needed so the const
can be dropped.

This fixes LTO complaints about conflicting section types.

Cc: herbert@gondor.apana.org.au
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 crypto/aes_generic.c | 8 ++++----
 include/crypto/aes.h | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/crypto/aes_generic.c b/crypto/aes_generic.c
index 13df33aca463..851b35949737 100644
--- a/crypto/aes_generic.c
+++ b/crypto/aes_generic.c
@@ -64,7 +64,7 @@ static inline u8 byte(const u32 x, const unsigned n)
 static const u32 rco_tab[10] = { 1, 2, 4, 8, 16, 32, 64, 128, 27, 54 };
 
 /* cacheline-aligned to facilitate prefetching into cache */
-__visible const u32 crypto_ft_tab[4][256] __cacheline_aligned = {
+__visible u32 crypto_ft_tab[4][256] __cacheline_aligned = {
 	{
 		0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6,
 		0x0df2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591,
@@ -328,7 +328,7 @@ __visible const u32 crypto_ft_tab[4][256] __cacheline_aligned = {
 	}
 };
 
-__visible const u32 crypto_fl_tab[4][256] __cacheline_aligned = {
+__visible u32 crypto_fl_tab[4][256] __cacheline_aligned = {
 	{
 		0x00000063, 0x0000007c, 0x00000077, 0x0000007b,
 		0x000000f2, 0x0000006b, 0x0000006f, 0x000000c5,
@@ -592,7 +592,7 @@ __visible const u32 crypto_fl_tab[4][256] __cacheline_aligned = {
 	}
 };
 
-__visible const u32 crypto_it_tab[4][256] __cacheline_aligned = {
+__visible u32 crypto_it_tab[4][256] __cacheline_aligned = {
 	{
 		0x50a7f451, 0x5365417e, 0xc3a4171a, 0x965e273a,
 		0xcb6bab3b, 0xf1459d1f, 0xab58faac, 0x9303e34b,
@@ -856,7 +856,7 @@ __visible const u32 crypto_it_tab[4][256] __cacheline_aligned = {
 	}
 };
 
-__visible const u32 crypto_il_tab[4][256] __cacheline_aligned = {
+__visible u32 crypto_il_tab[4][256] __cacheline_aligned = {
 	{
 		0x00000052, 0x00000009, 0x0000006a, 0x000000d5,
 		0x00000030, 0x00000036, 0x000000a5, 0x00000038,
diff --git a/include/crypto/aes.h b/include/crypto/aes.h
index 852eaa9cd4db..a03139ec930f 100644
--- a/include/crypto/aes.h
+++ b/include/crypto/aes.h
@@ -28,10 +28,10 @@ struct crypto_aes_ctx {
 	u32 key_length;
 };
 
-extern const u32 crypto_ft_tab[4][256];
-extern const u32 crypto_fl_tab[4][256];
-extern const u32 crypto_it_tab[4][256];
-extern const u32 crypto_il_tab[4][256];
+extern u32 crypto_ft_tab[4][256];
+extern u32 crypto_fl_tab[4][256];
+extern u32 crypto_it_tab[4][256];
+extern u32 crypto_il_tab[4][256];
 
 int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
 		unsigned int key_len);
-- 
2.20.1


  parent reply	other threads:[~2019-03-21 22:01 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 21:59 Fixes and cleanup from LTO tree Andi Kleen
2019-03-21 21:59 ` [PATCH 01/17] kbuild: Disable -Waddress-of-packed-member for gcc 9 Andi Kleen
2019-03-22 13:58   ` Arnd Bergmann
2019-03-22 16:31     ` Andi Kleen
2019-03-22 16:39     ` Peter Zijlstra
2019-03-22 16:57       ` Arnd Bergmann
2019-03-22 16:58       ` Andi Kleen
2019-03-25 16:27         ` David Laight
2019-04-01  1:04     ` Masahiro Yamada
2019-03-21 21:59 ` [PATCH 02/17] x86, lto: Mark all top level asm statements as .text Andi Kleen
2019-03-26 17:03   ` Thomas Gleixner
2019-03-26 21:38     ` Andi Kleen
2019-03-26 22:25       ` Thomas Gleixner
2019-03-27  0:55         ` Andi Kleen
2019-03-27  1:08           ` Andi Kleen
2019-03-27 14:20           ` Thomas Gleixner
2019-03-27 14:39             ` Ingo Molnar
2019-03-27 14:59             ` Andi Kleen
2019-03-27 15:08               ` Thomas Gleixner
2019-03-27 15:45                 ` Andi Kleen
2019-03-27 19:08                   ` Thomas Gleixner
2019-03-27 20:40                     ` Andi Kleen
2019-03-27 21:55                       ` Thomas Gleixner
2019-03-27 22:29                         ` Andi Kleen
2019-03-27 22:50                           ` Thomas Gleixner
2019-04-02  8:54                             ` Thomas Gleixner
2019-03-21 21:59 ` [PATCH 03/17] x86: Don't inline __const_udelay Andi Kleen
2019-03-21 21:59 ` [PATCH 04/17] init: Add __noreorder and mark initcalls __noreorder Andi Kleen
2019-03-21 21:59 ` [PATCH 05/17] Use C version for SYSCALL_ALIAS Andi Kleen
2019-03-21 21:59 ` [PATCH 06/17] locking/core: Mark spinlocks noinline when inline spinlocks are disabled Andi Kleen
2019-03-21 21:59 ` [PATCH 07/17] amdkfd: Fix extern declaration Andi Kleen
2019-03-21 22:00 ` [PATCH 08/17] x86/speculation: Fix __initconst in bugs.c Andi Kleen
2019-03-26 17:24   ` Thomas Gleixner
2019-03-21 22:00 ` [PATCH 09/17] x86/kvm: Make steal_time visible Andi Kleen
2019-03-21 22:00 ` [PATCH 10/17] delta: Fix buffer overrun in delta_ipc_open Andi Kleen
2019-04-01 13:37   ` Hugues FRUCHET
2019-04-01 16:54     ` Andi Kleen
2019-04-02  9:56       ` Hugues FRUCHET
2019-03-21 22:00 ` [PATCH 11/17] x86/kprobes: Make trampoline_handler global and visible Andi Kleen
2019-03-23  9:45   ` Masami Hiramatsu
2019-03-23 14:35     ` Andi Kleen
2019-03-25  1:53       ` Masami Hiramatsu
2019-03-21 22:00 ` [PATCH 12/17] afs: Avoid section confusion in CM_NAME Andi Kleen
2019-03-21 22:00 ` [PATCH 13/17] ASoC: AMD: Fix incorrect extern Andi Kleen
2019-03-21 22:00 ` Andi Kleen [this message]
2019-03-26  8:42   ` [PATCH 14/17] crypto: Don't mark AES tables const and cacheline_aligned Rasmus Villemoes
2019-03-26 18:30     ` Andi Kleen
2019-03-21 22:00 ` [PATCH 15/17] x86/hyperv: Make hv_vcpu_is_preempted visible Andi Kleen
2019-03-26  8:15   ` Yi Sun
2019-03-21 22:00 ` [PATCH 16/17] x86/xen: Mark xen_vcpu_stolen as __visible Andi Kleen
2019-03-21 22:00 ` [PATCH 17/17] dm: Fix const confusion in dm Andi Kleen
2019-03-22  8:34 ` [PATCH 12/17] afs: Avoid section confusion in CM_NAME David Howells
2019-03-26 17:00 ` Fixes and cleanup from LTO tree Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190321220009.29334-15-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).