From: Kees Cook <kees@kernel.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Michael Kelley <mhklinux@outlook.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [next-20250226]Build Failure
Date: Fri, 28 Feb 2025 09:46:15 -0800 [thread overview]
Message-ID: <202502280943.6558CAE@keescook> (raw)
In-Reply-To: <c68287f7-ad00-46fc-a92e-06e0c9074139@csgroup.eu>
On Thu, Feb 27, 2025 at 03:15:35PM +0100, Christophe Leroy wrote:
>
>
> Le 27/02/2025 à 15:05, Michael Kelley a écrit :
> > From: Christophe Leroy <christophe.leroy@csgroup.eu> Sent: Thursday, February 27, 2025 2:43 AM
> > >
> > > Le 27/02/2025 à 02:38, Stephen Rothwell a écrit :
> > > > Hi Venkat,
> > > >
> > > > CC Kees Cook for advice. This is a result of the tests added in commit
> > > >
> > > > bbeb38b8487a ("string.h: Validate memtostr*()/strtomem*() arguments more carefully")
> > > >
> > > > from the kspp tree.
> > > >
> > > > I note that the comment about memtostr() says "Copy a possibly
> > > > non-NUL-term string".
> > >
> > > Can you tell more about your config and your environment ?
> > >
> > > I just tested with ppc64_defconfig and ppc64le_defconfig, with gcc 12.4,
> > > gcc 13.2 and gcc 14.2 and didn't get that build error.
> > >
> > > Christophe
> >
> > FWIW, I see the same build failures related to __must_be_noncstr()
> > when building natively on x86 and on arm64. In both cases, it's an
> > Ubuntu 20.04 installation with gcc 9.4.0 and binutils 2.34.
> >
>
> Looks like I get that problem only with GCC 8.5 and GCC 9.5.
Okay, I've figured this out, and sent an updated patch:
https://lore.kernel.org/lkml/20250228174130.it.875-kees@kernel.org
This matches what you found, namely:
> I don't get it with gcc 10.3 nor 11.3 nor 12.4 nor 13.2 nor 14.2
These have both nonstring and __builtin_has_attribute()
> I don't get it either with gcc 5.5 or 7.5
These have neither.
The problem was in the span of time when nonstring got introduced, but
__builtin_has_attribute() hadn't been yet (GCC 8 and 9). I had accounted
for having neither, but not for missing one. :|
Thank you all for helping debug this!
-Kees
--
Kees Cook
next prev parent reply other threads:[~2025-02-28 17:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 1:00 [next-20250226]Build Failure Venkat Rao Bagalkote
2025-02-27 1:38 ` Stephen Rothwell
2025-02-27 10:43 ` Christophe Leroy
2025-02-27 13:47 ` Venkat Rao Bagalkote
2025-02-27 14:07 ` Christophe Leroy
2025-02-27 14:05 ` Michael Kelley
2025-02-27 14:15 ` Christophe Leroy
2025-02-28 17:20 ` Kees Cook
2025-02-28 17:46 ` Kees Cook [this message]
2025-03-01 5:44 ` Michael Kelley
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=202502280943.6558CAE@keescook \
--to=kees@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhklinux@outlook.com \
--cc=sfr@canb.auug.org.au \
--cc=venkat88@linux.vnet.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.