diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-01-17 19:00:59 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-01-17 19:00:59 +0100 |
commit | 41e1992665a2701fa025a8b76970c43b4148446f (patch) | |
tree | e104e90d36c50f476f98594a840f26576276dc5c /crypto/rsa-pkcs1pad.c | |
parent | 1ecf7bd9c267ab85aff3c4a17fe56bc9754a13be (diff) | |
download | linux-41e1992665a2701fa025a8b76970c43b4148446f.tar.bz2 |
s390: workaround invalid gcc-11 out of bounds read warning
GCC 11.1.0 and 11.2.0 generate a wrong warning when compiling the
kernel e.g. with allmodconfig:
arch/s390/kernel/setup.c: In function ‘setup_lowcore_dat_on’:
./include/linux/fortify-string.h:57:33: error: ‘__builtin_memcpy’ reading 128 bytes from a region of size 0 [-Werror=stringop-overread]
...
arch/s390/kernel/setup.c:526:9: note: in expansion of macro ‘memcpy’
526 | memcpy(abs_lc->cregs_save_area, S390_lowcore.cregs_save_area,
| ^~~~~~
This could be addressed by using absolute_pointer() with the
S390_lowcore macro, but this is not a good idea since this generates
worse code for performance critical paths.
Therefore simply use a for loop to copy the array in question and get
rid of the warning.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'crypto/rsa-pkcs1pad.c')
0 files changed, 0 insertions, 0 deletions