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:   Wed, 27 Apr 2022 09:57:33 +0800
From:   Stephen Zhang <starzhangzsd@...il.com>
To:     "Maciej W. Rozycki" <macro@...am.me.uk>
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        liam.howlett@...cle.com, ebiederm@...ssion.com, dbueso@...e.de,
        alobakin@...me, f.fainelli@...il.com,
        zhangshida <zhangshida@...inos.cn>, linux-kernel@...r.kernel.org,
        linux-mips@...r.kernel.org
Subject: Re: [PATCH] arch/mips/kernel/traps: add CONFIG_MIPS_FP_SUPPORT when
 using handle_fpe

Maciej W. Rozycki <macro@...am.me.uk> 于2022年4月27日周三 08:40写道:
>
>  No need to conditionalise this either, because `cpu_has_fpu' is forced 0
> (in arch/mips/include/asm/cpu-features.h) if !CONFIG_MIPS_FP_SUPPORT.  So
> this code translates to:
>
>  if (0 && !0)
>   set_except_vector(15, handle_fpe);
>
> in the preprocessor if CONFIG_MIPS_FP_SUPPORT is unset and is optimised
> away.  Otherwise it should be written as:
>
>         if (IS_ENABLED(CONFIG_MIPS_FP_SUPPORT) && ...
>
> so as not to clutter C code with #ifdef, as per our coding style.
>
>   Maciej

Thanks for your comment. Do you mean  the following code:

 if (0 && !0)
    set_except_vector(15, handle_fpe);

will be optimised away if !CONFIG_MIPS_FP_SUPPORT?
But we did get “undefined reference to `handle_fpe”  error when compiled with
!CONFIG_MIPS_FP_SUPPORT.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ