From: Daniel Gomez <da.gomez@kernel.org>
To: Chris Li <sparse@chrisli.org>, Al Viro <viro@zeniv.linux.org.uk>,
Sami Tolvanen <samitolvanen@google.com>
Cc: linux-sparse@vger.kernel.org, Aaron Tomlin <atomlin@atomlin.com>,
Andy Shevchenko <andriy.shevchenko@intel.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Eric Biggers <ebiggers@kernel.org>,
linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org,
"Luck, Tony" <tony.luck@intel.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] builtin: mark __builtin_strlen() as integer constant expression
Date: Thu, 19 Feb 2026 18:00:48 +0100 [thread overview]
Message-ID: <aZdAxZR-c8PY_uEL@macos> (raw)
In-Reply-To: <CABCJKuf8jh_yxQcR1=uMeuWOueXyoM5=L-QpTuBenRi_MZK_Gg@mail.gmail.com>
On 2026-02-19 08:41, Sami Tolvanen wrote:
> Hi Daniel,
>
> On Thu, Feb 19, 2026 at 8:11 AM Daniel Gomez <da.gomez@kernel.org> wrote:
> >
> > From: Daniel Gomez <da.gomez@samsung.com>
> >
> > Commit ae83f3b72621 ("module: Add compile-time check for embedded
> > NUL characters") in the Linux kernel added static assert checks for
> > __builtin_strlen() inside MODULE_INFO() macros. But sparse does not mark
> > the result as CEF_SET_ICE during evaluation, making these assertions
> > fail with:
> >
> > error: static assertion failed: "MODULE_INFO(...) contains embedded
> > NUL byte"
> >
> > Fix by marking __builtin_strlen() as an integer constant expression at
> > eval time. This matches other builtins like __builtin_constant_p() or
> > __builtin_safe_p().
> >
> > Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
> > ---
> > Discussion:
> > https://lore.kernel.org/all/aTc9s210am0YqMV4@agluck-desk3/
>
> It looks like Al had a more complete fix for this issue, but I guess
> it never ended up in the sparse repo?
>
> https://lore.kernel.org/all/aUV7kyjxlijuy5sC@agluck-desk3/
>
> Sami
Chris, Al,
Can you please take a look? If Al patch is the correct approach, any
chance you can send it and fix this?
next prev parent reply other threads:[~2026-02-19 17:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 16:10 [PATCH] builtin: mark __builtin_strlen() as integer constant expression Daniel Gomez
2026-02-19 16:41 ` Sami Tolvanen
2026-02-19 17:00 ` Daniel Gomez [this message]
2026-02-19 17:06 ` Chris Li
2026-02-19 19:20 ` Andy Shevchenko
2026-02-20 8:06 ` Chris Li
2026-02-20 8:30 ` Andy Shevchenko
2026-02-20 19:34 ` Chris Li
2026-02-24 10:26 ` Andy Shevchenko
2026-02-19 16:53 ` Daniel Gomez
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=aZdAxZR-c8PY_uEL@macos \
--to=da.gomez@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=atomlin@atomlin.com \
--cc=dan.carpenter@linaro.org \
--cc=dmitry.torokhov@gmail.com \
--cc=ebiggers@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--cc=sparse@chrisli.org \
--cc=tony.luck@intel.com \
--cc=viro@zeniv.linux.org.uk \
/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