]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.9/powerpc-64-make-meltdown-reporting-book3s-64-specifi.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.9 / powerpc-64-make-meltdown-reporting-book3s-64-specifi.patch
1 From 1ec953386c7c23f6699e325970b30a555f563646 Mon Sep 17 00:00:00 2001
2 From: Diana Craciun <diana.craciun@nxp.com>
3 Date: Thu, 11 Apr 2019 21:46:10 +1000
4 Subject: powerpc/64: Make meltdown reporting Book3S 64 specific
5
6 commit 406d2b6ae3420f5bb2b3db6986dc6f0b6dbb637b upstream.
7
8 In a subsequent patch we will enable building security.c for Book3E.
9 However the NXP platforms are not vulnerable to Meltdown, so make the
10 Meltdown vulnerability reporting PPC_BOOK3S_64 specific.
11
12 Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
13 [mpe: Split out of larger patch]
14 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
15 Signed-off-by: Sasha Levin <sashal@kernel.org>
16 ---
17 arch/powerpc/kernel/security.c | 2 ++
18 1 file changed, 2 insertions(+)
19
20 diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
21 index 926ed3c38741..2f30fc8ed0a8 100644
22 --- a/arch/powerpc/kernel/security.c
23 +++ b/arch/powerpc/kernel/security.c
24 @@ -93,6 +93,7 @@ static __init int barrier_nospec_debugfs_init(void)
25 device_initcall(barrier_nospec_debugfs_init);
26 #endif /* CONFIG_DEBUG_FS */
27
28 +#ifdef CONFIG_PPC_BOOK3S_64
29 ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf)
30 {
31 bool thread_priv;
32 @@ -125,6 +126,7 @@ ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, cha
33
34 return sprintf(buf, "Vulnerable\n");
35 }
36 +#endif
37
38 ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, char *buf)
39 {
40 --
41 2.19.1
42