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]
Message-ID: <alpine.DEB.2.21.2204291559490.9383@angie.orcam.me.uk>
Date:   Fri, 29 Apr 2022 16:11:38 +0100 (BST)
From:   "Maciej W. Rozycki" <macro@...am.me.uk>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>
cc:     Stephen Zhang <starzhangzsd@...il.com>, liam.howlett@...cle.com,
        ebiederm@...ssion.com, alobakin@...me, f.fainelli@...il.com,
        paul@...pouillou.net, linux@...ck-us.net, anemo@....ocn.ne.jp,
        zhangshida@...inos.cn, linux-kernel@...r.kernel.org,
        linux-mips@...r.kernel.org
Subject: Re: [PATCH v2] MIPS: undefine and redefine cpu_has_fpu when it is
 overrided

On Fri, 29 Apr 2022, Thomas Bogendoerfer wrote:

> > diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
> > index de8cb2ccb781..38eb469008b6 100644
> > --- a/arch/mips/include/asm/cpu-features.h
> > +++ b/arch/mips/include/asm/cpu-features.h
> > @@ -134,6 +134,10 @@
> >  # endif
> >  #else
> >  # define raw_cpu_has_fpu	cpu_has_fpu
> > +# ifndef CONFIG_MIPS_FP_SUPPORT
> > +#  undef cpu_has_fpu
> > +#  define cpu_has_fpu		0
> > +# endif
> >  #endif
> >  #ifndef cpu_has_32fpr
> >  #define cpu_has_32fpr		__isa_ge_or_opt(1, MIPS_CPU_32FPR)
> > -- 
> > 2.30.2
> 
> I prefer just removing the #defines from ip27/ip30 cpu-feasture-overrides.h. 
> Or isn't that enough for fixing the problem ?

 That's what I've meant, and I have now posted fixes, successfully 
build-tested.

 Additionally I've thought of adding something like:

#if cpu_has_fpu
# undef cpu_has_fpu
#endif

or maybe even:

#if cpu_has_fpu
# error "Forcing `cpu_has_fpu' to non-zero is not supported"
#endif

to arch/mips/include/asm/cpu-features.h, but maybe that's an overkill.

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ