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:   Mon, 12 Aug 2019 04:47:24 +0000
From:   Paul Burton <paul.burton@...s.com>
To:     Nathan Chancellor <natechancellor@...il.com>
CC:     Ralf Baechle <ralf@...ux-mips.org>,
        Paul Burton <pburton@...ecomp.com>,
        James Hogan <jhogan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "clang-built-linux@...glegroups.com" 
        <clang-built-linux@...glegroups.com>,
        Nathan Chancellor <natechancellor@...il.com>,
        "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>
Subject: Re: [PATCH 5/5] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a
 boolean

Hello,

Nathan Chancellor wrote:
> clang warns:
> 
> arch/mips/mm/tlbex.c:634:19: error: use of logical '&&' with constant
> operand [-Werror,-Wconstant-logical-operand]
>         if (cpu_has_rixi && _PAGE_NO_EXEC) {
>                          ^  ~~~~~~~~~~~~~
> arch/mips/mm/tlbex.c:634:19: note: use '&' for a bitwise operation
>         if (cpu_has_rixi && _PAGE_NO_EXEC) {
>                          ^~
>                          &
> arch/mips/mm/tlbex.c:634:19: note: remove constant to silence this
> warning
>         if (cpu_has_rixi && _PAGE_NO_EXEC) {
>                         ~^~~~~~~~~~~~~~~~
> 1 error generated.
> 
> Explicitly cast this value to a boolean so that clang understands we
> intend for this to be a non-zero value.
> 
> Fixes: 00bf1c691d08 ("MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields")

Applied to mips-next.

> commit c59ae0a10551
> https://git.kernel.org/mips/c/c59ae0a10551
> 
> Fixes: 00bf1c691d08 ("MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields")
> Link: https://github.com/ClangBuiltLinux/linux/issues/609
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> Signed-off-by: Paul Burton <paul.burton@...s.com>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@...s.com to report it. ]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ