linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: linux-s390@vger.kernel.org
Subject: debug_defconfig: error: call to '__write_overflow' declared with attribute error: detected write beyond size of object passed as 1st parameter
Date: Sat, 25 Sep 2021 00:02:35 +0200	[thread overview]
Message-ID: <20210924220235.nw5yicp5z27svvn5@lug-owl.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 4541 bytes --]

Hi!

I'm building a lot of Binutils/GCC targets and with those the Linux
kernel defconfigs.

For s390, I started to see a build error when building the
debug_defconfig:

[mk all 2021-09-20 04:27:45]   s390x-linux-gnu-gcc -Wp,-MMD,arch/s390/crypto/.paes_s390.o.d -nostdinc -isystem /var/lib/laminar/run/linux-s390-debug_defconfig/8/toolchain/bin/../lib/gcc/s390x-linux-gnu/12.0.0/include -I./arch/s390/include -I./arch/s390/include/generated  -I./include -I./arch/s390/include/uapi -I./arch/s390/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -m64 -fPIE -mbackchain -msoft-float -march=zEC12 -mtune=zEC12 -Wa,-I./arch/s390/include -mpacked-stack -D__PACK_STACK -mindirect-branch=thunk -mfunction-return=thunk -mindirect-branch-table -DCC_USING_EXPOLINE -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -DCONFIG_AS_CFI_VAL_OFFSET=1 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fno-stack-protector -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fno-stack-clash-protection -g -gdwarf-4 -pg -mrecord-mcount -mnop-mcount -mfentry -DCC_USING_NOP_MCOUNT -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned  -DMODULE -fPIC  -DKBUILD_BASENAME='"paes_s390"' -DKBUILD_MODNAME='"paes_s390"' -D__KBUILD_MODNAME=kmod_paes_s390 -c -o arch/s390/crypto/paes_s390.o arch/s390/crypto/paes_s390.c
[mk all 2021-09-20 04:27:47] In file included from ./include/linux/string.h:262,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/bitmap.h:10,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/cpumask.h:12,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/smp.h:13,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/lockdep.h:14,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/spinlock.h:63,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/mmzone.h:8,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/gfp.h:6,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/slab.h:15,
[mk all 2021-09-20 04:27:47]                  from ./include/linux/crypto.h:20,
[mk all 2021-09-20 04:27:47]                  from ./include/crypto/aes.h:10,
[mk all 2021-09-20 04:27:47]                  from arch/s390/crypto/paes_s390.c:16:
[mk all 2021-09-20 04:27:47] In function 'memcpy',
[mk all 2021-09-20 04:27:47]     inlined from '__paes_convert_key.part.0' at arch/s390/crypto/paes_s390.c:153:2:
[mk all 2021-09-20 04:27:47] ./include/linux/fortify-string.h:185:25: error: call to '__write_overflow' declared with attribute error: detected write beyond size of object passed as 1st parameter
[mk all 2021-09-20 04:27:47]   185 |                         __write_overflow();
[mk all 2021-09-20 04:27:47]       |                         ^~~~~~~~~~~~~~~~~~
[mk all 2021-09-20 04:27:47] make[2]: *** [scripts/Makefile.build:277: arch/s390/crypto/paes_s390.o] Error 1
[mk all 2021-09-20 04:27:47] make[1]: *** [scripts/Makefile.build:540: arch/s390/crypto] Error 2
[mk all 2021-09-20 04:27:47] make: *** [Makefile:1868: arch/s390] Error 2


On a first glimpse, I don't see how this overflows. Is it a compiler
bug? Used GCC is "s390x-linux-gnu-gcc (GCC) 12.0.0 20210917
(experimental)", while an older build for debug_defconfig (using an
older GCC, probably ce3316e9c02c81c509173572c71a101f4eb62a24 as of Thu
Jun 24 13:49:51 2021 -0400) succeeded.

  OTOH, I might have failed to pinpoint the actual bug and the newer GCC
correctly caught it?

Thanks,
  Jan-Benedict

-- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

             reply	other threads:[~2021-09-24 22:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 22:02 Jan-Benedict Glaw [this message]
2021-09-28 10:43 ` debug_defconfig: error: call to '__write_overflow' declared with attribute error: detected write beyond size of object passed as 1st parameter Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210924220235.nw5yicp5z27svvn5@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).