From: Dan Carpenter <dan.carpenter@linaro.org>
To: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Miguel Ojeda <ojeda@kernel.org>,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] compiler.h: Add missing include statement for build_bug.h
Date: Thu, 14 Nov 2024 14:05:53 +0300 [thread overview]
Message-ID: <870a1165-6281-4ca7-9379-83fc6cccf702@stanley.mountain> (raw)
In-Reply-To: <CADGDV=XZnkOUrc=AC=D5CeOHagiTbSGd2KGK0rN1MWoSXjidCw@mail.gmail.com>
On Thu, Nov 14, 2024 at 12:01:42PM +0100, Philipp Reisner wrote:
> On Thu, Nov 14, 2024 at 11:40 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > On Thu, Nov 14, 2024 at 11:14:02AM +0100, Philipp Reisner wrote:
> > > compiler.h defines __must_be_array() and __must_be_cstr() and both
> > > expand to BUILD_BUG_ON_ZERO(). build_bug.h defines BUILD_BUG_ON_ZERO().
> > > So far compiler.h lacks to include build_bug.h.
> > >
> > > Fix compiler.h by including build_bug.h. With that compiler.h and
> > > build_bug.h depend on each other.
> > >
> > > Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
> > > ---
> >
> > Fixes: ec0bbef66f86 ("Compiler Attributes: homogenize __must_be_array")
> >
> > What actually breaks? This commit is six years old. It's weird that we're only
> > seeing build breakage now. Or did you just notice this while reviewing the
> > code?
> >
>
> I am working on a compilation unit that includes linux/string.h.
> Compiling it breaks when using strscp(). That is since commit
> commit 559048d156ff3391c4b793779a824c9193e20442
> Author: Kees Cook <kees@kernel.org>
> Date: Mon Aug 5 14:43:44 2024 -0700
>
> Of course, my trivial workaround is including build_bug.h in my
> source; it is just not the proper way to fix this.
>
Ah, okay. Thanks. I thought it might have broken in tree code.
regards,
dan carpenter
next prev parent reply other threads:[~2024-11-14 11:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 10:14 [PATCH 0/1] Add missing include in compiler.h Philipp Reisner
2024-11-14 10:14 ` [PATCH 1/1] compiler.h: Add missing include statement for build_bug.h Philipp Reisner
2024-11-14 10:40 ` Dan Carpenter
2024-11-14 11:01 ` Philipp Reisner
2024-11-14 11:05 ` Dan Carpenter [this message]
2024-11-14 17:42 ` Linus Torvalds
2024-11-14 18:28 ` Linus Torvalds
2024-11-14 18:40 ` Linus Torvalds
2024-11-15 20:46 ` [PATCH] compiler.h: Fix undefined BUILD_BUG_ON_ZERO() Philipp Reisner
2024-11-15 20:48 ` Kees Cook
2024-11-15 21:58 ` Linus Torvalds
2024-11-15 21:57 ` Linus Torvalds
2024-11-17 5:26 ` Kees Cook
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=870a1165-6281-4ca7-9379-83fc6cccf702@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=ojeda@kernel.org \
--cc=philipp.reisner@linbit.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox