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: <1f54ae4c-8748-496b-0833-80749d8d4f6c@de.ibm.com>
Date:   Mon, 10 Feb 2020 08:55:46 +0100
From:   Christian Borntraeger <borntraeger@...ibm.com>
To:     Nathan Chancellor <natechancellor@...il.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>
Cc:     linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
        clang-built-linux@...glegroups.com
Subject: Re: -Wtautological-constant-compare in arch/s390/include/asm/page.h



On 08.02.20 13:57, Nathan Chancellor wrote:
> Hi all,
> 
> We noticed that you all added support for building s390 with clang,
> which is great! I have noticed a few warnings for which I will send
> patches but this one has me stumped.
> 
> In file included from ../lib/crypto/sha256.c:16:
> In file included from ../include/linux/module.h:13:
> In file included from ../include/linux/stat.h:19:
> In file included from ../include/linux/time.h:6:
> In file included from ../include/linux/seqlock.h:36:
> In file included from ../include/linux/spinlock.h:51:
> In file included from ../include/linux/preempt.h:78:
> In file included from ../arch/s390/include/asm/preempt.h:6:
> In file included from ../include/linux/thread_info.h:38:
> In file included from ../arch/s390/include/asm/thread_info.h:26:
> ../arch/s390/include/asm/page.h:45:6: warning: converting the result of '<<' to a boolean always evaluates to false [-Wtautological-constant-compare]
>         if (PAGE_DEFAULT_KEY)
>             ^
> ../arch/s390/include/asm/page.h:23:44: note: expanded from macro 'PAGE_DEFAULT_KEY'
> #define PAGE_DEFAULT_KEY        (PAGE_DEFAULT_ACC << 4)
>                                                   ^
> 1 warning generated.
> 
> PAGE_DEFAULT_PAGE is always 0, meaning this function never does what it
> is supposed to. Is this intentional? It seems that commit 0b642ede4796
> ("[PATCH] s390: default storage key") added this and it mentions that it
> can be overwritten at build time but I do not see any infrastructure for
> doing that. Any clarification that you can give so we can solve this
> warning would be much appreciated!

Yes, it is a debugging tool that we use from time to time. The user would then
change PAGE_DEFAULT_ACC in the header file when needed. It was not worth a config
option as normal users should not use it. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ