]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.9/0034-x86-speculation-Mark-string-arrays-const-correctly.patch
Linux 4.14.119
[thirdparty/kernel/stable-queue.git] / queue-4.9 / 0034-x86-speculation-Mark-string-arrays-const-correctly.patch
1 From edb83ada0dfb83c74453c5afab4fbbb730021750 Mon Sep 17 00:00:00 2001
2 From: Thomas Gleixner <tglx@linutronix.de>
3 Date: Sun, 25 Nov 2018 19:33:42 +0100
4 Subject: [PATCH 34/76] x86/speculation: Mark string arrays const correctly
5
6 commit 8770709f411763884535662744a3786a1806afd3 upstream.
7
8 checkpatch.pl muttered when reshuffling the code:
9 WARNING: static const char * array should probably be static const char * const
10
11 Fix up all the string arrays.
12
13 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 Reviewed-by: Ingo Molnar <mingo@kernel.org>
15 Cc: Peter Zijlstra <peterz@infradead.org>
16 Cc: Andy Lutomirski <luto@kernel.org>
17 Cc: Linus Torvalds <torvalds@linux-foundation.org>
18 Cc: Jiri Kosina <jkosina@suse.cz>
19 Cc: Tom Lendacky <thomas.lendacky@amd.com>
20 Cc: Josh Poimboeuf <jpoimboe@redhat.com>
21 Cc: Andrea Arcangeli <aarcange@redhat.com>
22 Cc: David Woodhouse <dwmw@amazon.co.uk>
23 Cc: Tim Chen <tim.c.chen@linux.intel.com>
24 Cc: Andi Kleen <ak@linux.intel.com>
25 Cc: Dave Hansen <dave.hansen@intel.com>
26 Cc: Casey Schaufler <casey.schaufler@intel.com>
27 Cc: Asit Mallick <asit.k.mallick@intel.com>
28 Cc: Arjan van de Ven <arjan@linux.intel.com>
29 Cc: Jon Masters <jcm@redhat.com>
30 Cc: Waiman Long <longman9394@gmail.com>
31 Cc: Greg KH <gregkh@linuxfoundation.org>
32 Cc: Dave Stewart <david.c.stewart@intel.com>
33 Cc: Kees Cook <keescook@chromium.org>
34 Link: https://lkml.kernel.org/r/20181125185004.800018931@linutronix.de
35 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
36 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37 ---
38 arch/x86/kernel/cpu/bugs.c | 6 +++---
39 1 file changed, 3 insertions(+), 3 deletions(-)
40
41 diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
42 index 5b8551aacb18..f5bb620f7882 100644
43 --- a/arch/x86/kernel/cpu/bugs.c
44 +++ b/arch/x86/kernel/cpu/bugs.c
45 @@ -235,7 +235,7 @@ enum spectre_v2_mitigation_cmd {
46 SPECTRE_V2_CMD_RETPOLINE_AMD,
47 };
48
49 -static const char *spectre_v2_strings[] = {
50 +static const char * const spectre_v2_strings[] = {
51 [SPECTRE_V2_NONE] = "Vulnerable",
52 [SPECTRE_V2_RETPOLINE_MINIMAL] = "Vulnerable: Minimal generic ASM retpoline",
53 [SPECTRE_V2_RETPOLINE_MINIMAL_AMD] = "Vulnerable: Minimal AMD ASM retpoline",
54 @@ -481,7 +481,7 @@ enum ssb_mitigation_cmd {
55 SPEC_STORE_BYPASS_CMD_SECCOMP,
56 };
57
58 -static const char *ssb_strings[] = {
59 +static const char * const ssb_strings[] = {
60 [SPEC_STORE_BYPASS_NONE] = "Vulnerable",
61 [SPEC_STORE_BYPASS_DISABLE] = "Mitigation: Speculative Store Bypass disabled",
62 [SPEC_STORE_BYPASS_PRCTL] = "Mitigation: Speculative Store Bypass disabled via prctl",
63 @@ -822,7 +822,7 @@ early_param("l1tf", l1tf_cmdline);
64 #define L1TF_DEFAULT_MSG "Mitigation: PTE Inversion"
65
66 #if IS_ENABLED(CONFIG_KVM_INTEL)
67 -static const char *l1tf_vmx_states[] = {
68 +static const char * const l1tf_vmx_states[] = {
69 [VMENTER_L1D_FLUSH_AUTO] = "auto",
70 [VMENTER_L1D_FLUSH_NEVER] = "vulnerable",
71 [VMENTER_L1D_FLUSH_COND] = "conditional cache flushes",
72 --
73 2.21.0
74