summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2019-05-14 23:13:13 +0100
committerBen Hutchings <ben@decadent.org.uk>2019-05-14 23:13:13 +0100
commitc41f9103f8a6d86118537f1558079a009b5e5dd2 (patch)
tree5cff546bfa66283c26c720c2ef81e5eb7a59f866
parent39d6ee8c766576ac9718e8876247b79f4d5e1e9d (diff)
downloadlinux-stable-queue-c41f9103f8a6d86118537f1558079a009b5e5dd2.tar.gz
Fix section conflict in arch/x86/kernel/cpu/bugs.c for x86_32
-rw-r--r--queue-3.16/series1
-rw-r--r--queue-3.16/x86-cpu-bugs-use-__initconst-for-const-init-data.patch49
2 files changed, 50 insertions, 0 deletions
diff --git a/queue-3.16/series b/queue-3.16/series
index f21d8f51..a08968a6 100644
--- a/queue-3.16/series
+++ b/queue-3.16/series
@@ -82,3 +82,4 @@ x86-speculation-mds-add-mitigations-support-for-mds.patch
x86-mds-add-mdsum-variant-to-the-mds-documentation.patch
documentation-correct-the-possible-mds-sysfs-values.patch
x86-speculation-mds-fix-documentation-typo.patch
+x86-cpu-bugs-use-__initconst-for-const-init-data.patch
diff --git a/queue-3.16/x86-cpu-bugs-use-__initconst-for-const-init-data.patch b/queue-3.16/x86-cpu-bugs-use-__initconst-for-const-init-data.patch
new file mode 100644
index 00000000..776d4156
--- /dev/null
+++ b/queue-3.16/x86-cpu-bugs-use-__initconst-for-const-init-data.patch
@@ -0,0 +1,49 @@
+From: Andi Kleen <ak@linux.intel.com>
+Date: Fri, 29 Mar 2019 17:47:43 -0700
+Subject: x86/cpu/bugs: Use __initconst for 'const' init data
+
+commit 1de7edbb59c8f1b46071f66c5c97b8a59569eb51 upstream.
+
+Some of the recently added const tables use __initdata which causes section
+attribute conflicts.
+
+Use __initconst instead.
+
+Fixes: fa1202ef2243 ("x86/speculation: Add command line control")
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Link: https://lkml.kernel.org/r/20190330004743.29541-9-andi@firstfloor.org
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+---
+ arch/x86/kernel/cpu/bugs.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/kernel/cpu/bugs.c
++++ b/arch/x86/kernel/cpu/bugs.c
+@@ -383,7 +383,7 @@ static const struct {
+ const char *option;
+ enum spectre_v2_user_cmd cmd;
+ bool secure;
+-} v2_user_options[] __initdata = {
++} v2_user_options[] __initconst = {
+ { "auto", SPECTRE_V2_USER_CMD_AUTO, false },
+ { "off", SPECTRE_V2_USER_CMD_NONE, false },
+ { "on", SPECTRE_V2_USER_CMD_FORCE, true },
+@@ -519,7 +519,7 @@ static const struct {
+ const char *option;
+ enum spectre_v2_mitigation_cmd cmd;
+ bool secure;
+-} mitigation_options[] __initdata = {
++} mitigation_options[] __initconst = {
+ { "off", SPECTRE_V2_CMD_NONE, false },
+ { "on", SPECTRE_V2_CMD_FORCE, true },
+ { "retpoline", SPECTRE_V2_CMD_RETPOLINE, false },
+@@ -796,7 +796,7 @@ static const char * const ssb_strings[]
+ static const struct {
+ const char *option;
+ enum ssb_mitigation_cmd cmd;
+-} ssb_mitigation_options[] __initdata = {
++} ssb_mitigation_options[] __initconst = {
+ { "auto", SPEC_STORE_BYPASS_CMD_AUTO }, /* Platform decides */
+ { "on", SPEC_STORE_BYPASS_CMD_ON }, /* Disable Speculative Store Bypass */
+ { "off", SPEC_STORE_BYPASS_CMD_NONE }, /* Don't touch Speculative Store Bypass */