From: Jani Nikula <jani.nikula@linux.intel.com>
To: Thorsten Leemhuis <linux@leemhuis.info>,
Kees Cook <kees@kernel.org>,
Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.wang.linux@gmail.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
intel-gvt-dev@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
Justin Forbes <jforbes@redhat.com>,
Nicolas Chauvet <kwizart@gmail.com>
Subject: Re: [PATCH] drm/i915/gvt: Add __nonstring annotations for unterminated strings
Date: Tue, 01 Apr 2025 11:46:03 +0300 [thread overview]
Message-ID: <87ecyc46d0.fsf@intel.com> (raw)
In-Reply-To: <37e1da82-736f-44a4-af51-036f9e3182f4@leemhuis.info>
On Mon, 31 Mar 2025, Thorsten Leemhuis <linux@leemhuis.info> wrote:
> On 10.03.25 23:23, Kees Cook 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]
>> [...]
>> Signed-off-by: Kees Cook <kees@kernel.org>
>
> To provide another small data point:
>
> Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
>
> A "Compile-Tested-by", to be precise: after a handful similar patches
> reached mainline recently this is the only one I still need to compile
> the pretty broad Fedora rawhide config on rawhide using the GCC 15
> pre-release it currently includes. The latter or the final will
> hopefully soon also reach Fedora 42 beta as well and bring the "[1]"
> mentioned in the patch description above to F42 -- which will be
> released in a few weeks, so I guess it would be nice to have this patch
> mainlined rather sooner that later to avoid more people running into this.
Thanks for testing, though I've merged [1] instead.
BR,
Jani.
[1] https://lore.kernel.org/r/20250327124739.2609656-1-jani.nikula@intel.com
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-04-01 8:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 22:23 [PATCH] drm/i915/gvt: Add __nonstring annotations for unterminated strings Kees Cook
2025-03-23 12:42 ` Damian Tometzki
2025-03-24 12:54 ` Jani Nikula
2025-03-24 21:19 ` Nicolas Chauvet
2025-03-25 19:22 ` Damian Tometzki
2025-03-25 19:25 ` Kees Cook
2025-03-31 14:51 ` Thorsten Leemhuis
2025-04-01 8:46 ` Jani Nikula [this message]
2025-04-01 9:28 ` Thorsten Leemhuis
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=87ecyc46d0.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=jforbes@redhat.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kees@kernel.org \
--cc=kwizart@gmail.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=tursulin@ursulin.net \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.wang.linux@gmail.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