Thread (13 messages) 13 messages, 3 authors, 2018-07-20

Re: [PATCH v4 4/6] powerpc/fsl: Enable cpu vulnerabilities reporting for NXP PPC BOOK3E

From: Diana Madalina Craciun <hidden>
Date: 2018-07-20 15:34:27

On 7/19/2018 3:05 PM, Michael Ellerman wrote:=0A=
LEROY Christophe [off-list ref] writes:=0A=
quoted
Diana Madalina Craciun [off-list ref] a =E9crit :=0A=
quoted
On 7/17/2018 7:47 PM, LEROY Christophe wrote:=0A=
quoted
Diana Craciun [off-list ref] a =E9crit :=0A=
quoted
The NXP PPC Book3E platforms are not vulnerable to meltdown and=0A=
Spectre v4, so make them PPC_BOOK3S_64 specific.=0A=
=0A=
Signed-off-by: Diana Craciun <redacted>=0A=
---=0A=
History:=0A=
=0A=
v2-->v3=0A=
- used the existing functions for spectre v1/v2=0A=
=0A=
 arch/powerpc/Kconfig           | 7 ++++++-=0A=
 arch/powerpc/kernel/security.c | 2 ++=0A=
 2 files changed, 8 insertions(+), 1 deletion(-)=0A=
=0A=
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig=0A=
index 9f2b75f..116c953 100644=0A=
--- a/arch/powerpc/Kconfig=0A=
+++ b/arch/powerpc/Kconfig=0A=
@@ -165,7 +165,7 @@ config PPC=0A=
 	select GENERIC_CLOCKEVENTS_BROADCAST	if SMP=0A=
 	select GENERIC_CMOS_UPDATE=0A=
 	select GENERIC_CPU_AUTOPROBE=0A=
-	select GENERIC_CPU_VULNERABILITIES	if PPC_BOOK3S_64=0A=
+	select GENERIC_CPU_VULNERABILITIES	if PPC_NOSPEC=0A=
I don't understand.  You say this patch is to make something specific=
=0A=
quoted
quoted
quoted
to book3s64 specific, and you are creating a new config param that=0A=
make things less specific=0A=
=0A=
Christophe=0A=
In order to enable the vulnerabilities reporting on NXP socs I need to=
=0A=
quoted
quoted
enable them for PPC_FSL_BOOK3E. So they will be enabled for both=0A=
PPC_FSL_BOOK3E and PPC_BOOK3S_64. This is the reason for adding the=0A=
Kconfig. However this will enable: spectre v1/v2 and meltdown. NXP socs=
=0A=
quoted
quoted
are not vulnerable to meltdown, so I made the meltdown reporting=0A=
PPC_BOOK3S_64 specific. I guess I can have the PPC_NOSPEC definition in=
=0A=
quoted
quoted
a separate patch to be more clear.=0A=
Yes you can. Or keep it as a single patch and add the details you gave  =
=0A=
quoted
me in the patch description.=0A=
Yeah I think the patch is fine, but the change log is a bit short on deta=
il.=0A=
=0A=
If you just send me a new change log I can fold it in.=0A=
=0A=
cheers=0A=
=0A=
Thanks! This is the new change log:=0A=
=0A=
"The Spectre/Meltdown vulnerabilities will be enabled for both=0A=
PPC_FSL_BOOK3E and PPC_BOOK3S_64. In order to avoid a complicated ifdef=0A=
we add a new Kconfig (PPC_NOSPEC) to select the common code between=0A=
BOOK3S_64 and FSL_BOOK3E. However, the NXP platforms are not vulnerable=0A=
to Meltdown, so make the Meltdown vulnerability reporting PPC_BOOK3S_64=0A=
specific."=0A=
=0A=
Regards,=0A=
=0A=
Diana=0A=
=0A=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help