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:   Fri, 22 Apr 2022 10:54:09 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Sven Schnelle <svens@...ux.ibm.com>
Cc:     Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] s390: disable -Warray-bounds

On Fri, Apr 22, 2022 at 03:43:08PM +0200, Sven Schnelle wrote:
> gcc-12 shows a lot of array bound warnings on s390. This is caused
> by our S390_lowcore macro:
> 
> which uses an hardcoded address of 0. Wrapping that with
> absolute_pointer() works, but gcc no longer knows that a 12 bit
> instruction is sufficient to access lowcore. So it emits instructions
> like 'lghi %r1,0; l %rx,xxx(%r1)' instead of a single load/store
> instruction. As s390 stores variables often read/written in lowcore,
> this is considered problematic. Therefore disable -Warray-bounds on
> s390 for now until there is a better real solution.
> 
> Signed-off-by: Sven Schnelle <svens@...ux.ibm.com>

It looks like the source of this problem (the literal-values-treated-as-NULL)
is gcc-12 specific. From the discussions, it sounded like Jacob was
going to fix this "correctly" in gcc-13. It might be a good idea to make
this version-checked? (i.e. only disable on gcc-12)

Either way:

Reviewed-by: Kees Cook <keescook@...omium.org>

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ