lkml.org 
[lkml]   [2022]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@linux.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@chromium.org>

--
Kees Cook

\
 
 \ /
  Last update: 2022-04-22 20:05    [W:0.154 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site