From: Daniel Gomez <da.gomez@kernel.org>
To: Chris Li <sparse@chrisli.org>, linux-sparse@vger.kernel.org
Cc: 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>,
Sami Tolvanen <samitolvanen@google.com>
Subject: Re: [PATCH] builtin: mark __builtin_strlen() as integer constant expression
Date: Thu, 19 Feb 2026 17:53:54 +0100 [thread overview]
Message-ID: <aZc_NiSIjlZG7kly@macos> (raw)
In-Reply-To: <20260219-fix-builtin-strlen-v1-1-3ec3efc0cda7@samsung.com>
On 2026-02-19 17:10, Daniel Gomez 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>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: "Luck, Tony" <tony.luck@intel.com>
Reported-by: Eric Biggers <ebiggers@kernel.org>
prev parent reply other threads:[~2026-02-19 16:53 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
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 [this message]
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=aZc_NiSIjlZG7kly@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 \
/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.