lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Nov 2018 08:25:47 +0100
From:   Mathieu Malaterre <malat@...ian.org>
To:     Christophe LEROY <christophe.leroy@....fr>
Cc:     Michael Ellerman <mpe@...erman.id.au>,
        Breno Leitao <leitao@...ian.org>,
        Paul Mackerras <paulus@...ba.org>,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] powerpc: Mark variable `cpumsr` as unused

On Thu, Nov 8, 2018 at 7:09 AM Christophe Leroy <christophe.leroy@....fr> wrote:
>
>
>
> On 11/07/2018 08:26 PM, Mathieu Malaterre wrote:
> > Add gcc attribute unused for `cpumsr` variable.
> >
> > Fix warnings treated as errors with W=1:
> >
> >    arch/powerpc/kernel/process.c:231:16: error: variable ‘cpumsr’ set but not used [-Werror=unused-but-set-variable]
> >    arch/powerpc/kernel/process.c:296:16: error: variable ‘cpumsr’ set but not used [-Werror=unused-but-set-variable]
> >
> > Signed-off-by: Mathieu Malaterre <malat@...ian.org>
>
> I don't think this is the good way to fix that. This problem was
> introduced by commit 5c784c8414fb ("powerpc/tm: Remove
> msr_tm_active()"). That commit should be reverted and fixed.

I see, it makes sense.

> That commit should have removed the macro and kept the inline function.

Breno, what do you think ?

> Christophe
>
> > ---
> >   arch/powerpc/kernel/process.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> > index 96f34730010f..b9f1a2408738 100644
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -228,7 +228,7 @@ EXPORT_SYMBOL_GPL(flush_fp_to_thread);
> >
> >   void enable_kernel_fp(void)
> >   {
> > -     unsigned long cpumsr;
> > +     unsigned long cpumsr __maybe_unused;
> >
> >       WARN_ON(preemptible());
> >
> > @@ -293,7 +293,7 @@ EXPORT_SYMBOL(giveup_altivec);
> >
> >   void enable_kernel_altivec(void)
> >   {
> > -     unsigned long cpumsr;
> > +     unsigned long cpumsr __maybe_unused;
> >
> >       WARN_ON(preemptible());
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ