From: Kees Cook <kees@kernel.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] iio: magnetometer: ak8974: Add __nonstring annotations for unterminated strings
Date: Sat, 15 Mar 2025 14:56:02 -0700 [thread overview]
Message-ID: <202503151455.B8E9F6F1@keescook> (raw)
In-Reply-To: <20250315183125.40f9c566@jic23-huawei>
On Sat, Mar 15, 2025 at 06:31:25PM +0000, Jonathan Cameron wrote:
> On Fri, 14 Mar 2025 11:31:09 +0100
> Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > On Mon, Mar 10, 2025 at 11:23 PM Kees Cook <kees@kernel.org> wrote:
> >
> > > When a character array without a terminating NUL character has a static
> > > initializer, GCC 15's -Wunterminated-string-initialization will only
> > > warn if the array lacks the "nonstring" attribute[1]. Mark the arrays
> > > with __nonstring to and correctly identify the char array as "not a C
> > > string" and thereby eliminate the warning.
> > >
> > > Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1]
> > > Cc: Linus Walleij <linus.walleij@linaro.org>
> > > Cc: Jonathan Cameron <jic23@kernel.org>
> > > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > > Cc: linux-iio@vger.kernel.org
> > > Signed-off-by: Kees Cook <kees@kernel.org>
> >
> > Fair enough,
> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> >
> Kees,
>
> I've currently queued this for next cycle as it doesn't feel like a fix
> as such and I've already sent my pull request for the merge window.
>
> Is it worth rushing it in, or is a fully cycle delay an issue? (6.16)
>
> If slow is fine, applied to the testing branch of iio.git which gets
> 0-day bot exposure.
No rush needed at all. This is just for cleaning up warnings for the
coming releases of GCC 15 in couple months. Thanks for picking it up!
--
Kees Cook
next prev parent reply other threads:[~2025-03-15 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 22:23 [PATCH] iio: magnetometer: ak8974: Add __nonstring annotations for unterminated strings Kees Cook
2025-03-14 10:31 ` Linus Walleij
2025-03-15 18:31 ` Jonathan Cameron
2025-03-15 21:56 ` Kees Cook [this message]
2025-04-22 18:11 ` Jonathan Cameron
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=202503151455.B8E9F6F1@keescook \
--to=kees@kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.