From: "Gustavo A. R. Silva" <gustavo@embeddedor•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: Re: linux-next: build failure after merge of the kspp-gustavo tree
Date: Tue, 21 Nov 2023 10:31:16 -0600 [thread overview]
Message-ID: <26671a7a-c3ed-448e-a220-108516a50deb@embeddedor.com> (raw)
In-Reply-To: <20231121131903.68a37932@canb.auug.org.au>
Hi Stephen,
On 11/20/23 20:19, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kspp-gustavo tree, today's linux-next build (powerpc
> pseries_le_defconfig) failed like this:
>
> arch/powerpc/crypto/aes-gcm-p10-glue.c: In function 'gcmp10_init':
> arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: error: 'gcm_init_htable' accessing 256 bytes in a region of size 224 [-Werror=stringop-overflow=]
> 120 | gcm_init_htable(hash->Htable+32, hash->H);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 1 of type 'unsigned char[256]'
> arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 2 of type 'unsigned char[16]'
> arch/powerpc/crypto/aes-gcm-p10-glue.c:40:17: note: in a call to function 'gcm_init_htable'
> 40 | asmlinkage void gcm_init_htable(unsigned char htable[256], unsigned char Xi[16]);
> | ^~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> 167820dd258d ("Makefile: Enable -Wstringop-overflow globally")
>
> I have used the kspp-gustavo tree from next-20231120 for today.
>
Thanks a lot for the report, again!
We are pretty close to enabling this compiler option, and it seems you
are catching issues that neither 0-day folks nor I have caught before.
I wonder if you could help me catch the rest of these issues by disabling
WERROR (so we can get all the warnings) and letting your builds run with the
following patch on top:
diff --git a/Makefile b/Makefile
index ede0bd241056..596c33e6319b 100644
--- a/Makefile
+++ b/Makefile
@@ -982,6 +982,8 @@ NOSTDINC_FLAGS += -nostdinc
# perform bounds checking.
KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)
+KBUILD_CFLAGS += $(call cc-option, -Wstringop-overflow)
+
# disable invalid "can't wrap" optimizations for signed / pointers
KBUILD_CFLAGS += -fno-strict-overflow
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 2fe6f2828d37..1527199161d7 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -106,7 +106,6 @@ KBUILD_CFLAGS += $(call cc-option, -Wunused-const-variable)
KBUILD_CFLAGS += $(call cc-option, -Wpacked-not-aligned)
KBUILD_CFLAGS += $(call cc-option, -Wformat-overflow)
KBUILD_CFLAGS += $(call cc-option, -Wformat-truncation)
-KBUILD_CFLAGS += $(call cc-option, -Wstringop-overflow)
KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)
KBUILD_CPPFLAGS += -Wundef
@@ -122,7 +121,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned)
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
-KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
ifdef CONFIG_CC_IS_CLANG
Thank you!
--
Gustavo
next prev parent reply other threads:[~2023-11-21 16:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 2:19 linux-next: build failure after merge of the kspp-gustavo tree Stephen Rothwell
2023-11-21 16:31 ` Gustavo A. R. Silva [this message]
2023-11-21 23:15 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2023-11-17 0:33 Stephen Rothwell
2023-11-17 0:39 ` Gustavo A. R. Silva
2021-10-18 8:30 Stephen Rothwell
2021-10-20 16:18 ` Gustavo A. R. Silva
2021-10-20 16:20 ` Kees Cook
2021-10-25 1:55 ` Stephen Rothwell
2021-10-25 19:19 ` Kees Cook
2021-10-25 19:31 ` Gustavo A. R. Silva
2021-10-25 19:34 ` Kees Cook
2021-10-18 7:15 Stephen Rothwell
2021-10-18 17:13 ` Gustavo A. R. Silva
2021-10-25 1:54 ` Stephen Rothwell
2021-10-25 2:11 ` Gustavo A. R. Silva
2021-10-25 2:42 ` Steven Rostedt
2021-10-25 4:30 ` Stephen Rothwell
2021-10-25 11:35 ` Steven Rostedt
2021-10-14 23:48 Stephen Rothwell
2021-10-15 0:07 ` Gustavo A. R. Silva
2021-10-15 8:02 ` Stephen Rothwell
2021-09-29 23:59 Stephen Rothwell
2021-09-30 0:11 ` Gustavo A. R. Silva
2020-08-17 23:38 Stephen Rothwell
2020-08-18 0:06 ` Gustavo A. R. Silva
2020-08-17 23:34 Stephen Rothwell
2020-08-17 23:46 ` Gustavo A. R. Silva
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=26671a7a-c3ed-448e-a220-108516a50deb@embeddedor.com \
--to=gustavo@embeddedor$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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