]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.4/x86-cpu-bugs-use-__initconst-for-const-init-data.patch
4.4-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.4 / x86-cpu-bugs-use-__initconst-for-const-init-data.patch
CommitLineData
1f91e7a4
GKH
1From foo@baz Tue 14 May 2019 08:29:35 PM CEST
2From: Andi Kleen <ak@linux.intel.com>
3Date: Fri, 29 Mar 2019 17:47:43 -0700
4Subject: x86/cpu/bugs: Use __initconst for 'const' init data
5
6From: Andi Kleen <ak@linux.intel.com>
7
8commit 1de7edbb59c8f1b46071f66c5c97b8a59569eb51 upstream.
9
10Some of the recently added const tables use __initdata which causes section
11attribute conflicts.
12
13Use __initconst instead.
14
15Fixes: fa1202ef2243 ("x86/speculation: Add command line control")
16Signed-off-by: Andi Kleen <ak@linux.intel.com>
17Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
18Link: https://lkml.kernel.org/r/20190330004743.29541-9-andi@firstfloor.org
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 arch/x86/kernel/cpu/bugs.c | 6 +++---
23 1 file changed, 3 insertions(+), 3 deletions(-)
24
25--- a/arch/x86/kernel/cpu/bugs.c
26+++ b/arch/x86/kernel/cpu/bugs.c
27@@ -315,7 +315,7 @@ static const struct {
28 const char *option;
29 enum spectre_v2_user_cmd cmd;
30 bool secure;
31-} v2_user_options[] __initdata = {
32+} v2_user_options[] __initconst = {
33 { "auto", SPECTRE_V2_USER_CMD_AUTO, false },
34 { "off", SPECTRE_V2_USER_CMD_NONE, false },
35 { "on", SPECTRE_V2_USER_CMD_FORCE, true },
36@@ -451,7 +451,7 @@ static const struct {
37 const char *option;
38 enum spectre_v2_mitigation_cmd cmd;
39 bool secure;
40-} mitigation_options[] __initdata = {
41+} mitigation_options[] __initconst = {
42 { "off", SPECTRE_V2_CMD_NONE, false },
43 { "on", SPECTRE_V2_CMD_FORCE, true },
44 { "retpoline", SPECTRE_V2_CMD_RETPOLINE, false },
45@@ -723,7 +723,7 @@ static const char * const ssb_strings[]
46 static const struct {
47 const char *option;
48 enum ssb_mitigation_cmd cmd;
49-} ssb_mitigation_options[] __initdata = {
50+} ssb_mitigation_options[] __initconst = {
51 { "auto", SPEC_STORE_BYPASS_CMD_AUTO }, /* Platform decides */
52 { "on", SPEC_STORE_BYPASS_CMD_ON }, /* Disable Speculative Store Bypass */
53 { "off", SPEC_STORE_BYPASS_CMD_NONE }, /* Don't touch Speculative Store Bypass */