[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbUk8bVWLPwVRq0qzaKRC80=bV1Wd01h+5xfH1O7-BVaQ@mail.gmail.com>
Date: Fri, 14 Mar 2025 11:31:09 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Kees Cook <kees@...nel.org>
Cc: Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] iio: magnetometer: ak8974: Add __nonstring annotations
for unterminated strings
On Mon, Mar 10, 2025 at 11:23 PM Kees Cook <kees@...nel.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@...aro.org>
> Cc: Jonathan Cameron <jic23@...nel.org>
> Cc: Lars-Peter Clausen <lars@...afoo.de>
> Cc: linux-iio@...r.kernel.org
> Signed-off-by: Kees Cook <kees@...nel.org>
Fair enough,
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists