lkml.org 
[lkml]   [2018]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] powerpc/64s: Enhance the information in cpu_show_spectre_v1()
On Tue, 29 May 2018 16:13:49 +0200
Christophe LEROY <christophe.leroy@c-s.fr> wrote:

> Le 28/05/2018 à 15:19, Michal Suchanek a écrit :
> > We now have barrier_nospec as mitigation so print it in
> > cpu_show_spectre_v1 when enabled.
> >
> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> > ---
> > arch/powerpc/kernel/security.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/powerpc/kernel/security.c
> > b/arch/powerpc/kernel/security.c index 0239383c7e4d..a0c32d53980b
> > 100644 --- a/arch/powerpc/kernel/security.c
> > +++ b/arch/powerpc/kernel/security.c
> > @@ -120,7 +120,10 @@ ssize_t cpu_show_spectre_v1(struct device
> > *dev, struct device_attribute *attr, c if
> > (!security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR)) return
> > sprintf(buf, "Not affected\n");
> > - return sprintf(buf, "Vulnerable\n");
> > + if (barrier_nospec_enabled)
>
> > + return sprintf(buf, "Mitigation: __user pointer
> > sanitization\n");
> > + else
> > + return sprintf(buf, "Vulnerable\n");
>
> Checkpatch would tell you that an else is unneeded after a return. So
> just leave it as it was before.

Where did you get your copy of checkpatch? The one in Linux tree does
not do that.

Thanks

Michal

\
 
 \ /
  Last update: 2018-05-29 16:48    [W:0.101 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site