Re: [PATCH] EISA: Increase length of device names

From: Kees Cook
Date: Mon Apr 07 2025 - 12:53:55 EST


On Sat, Mar 15, 2025 at 09:27:36AM -0500, Alex Elder wrote:
> On 3/10/25 5:24 PM, Kees Cook wrote:
> > GCC 15's -Wunterminated-string-initialization warned about truncated
> > name strings. Instead of marking them with the "nonstring" attribute[1],
> > increase their length to correctly include enough space for the
> > terminating NUL character, as they are used with %s format specifiers.
> >
> > Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1]
> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Cc: Azeem Shaikh <azeemshaikh38@xxxxxxxxx>
> > Cc: Alex Elder <elder@xxxxxxxxxx>
>
> This was interesting, but based on the bug text I suspect you
> meant to address this to Alejandro Colomar, <alx@xxxxxxxxxx>.

I think you got tagged because of the Reviewed-by on commit d69d80484598
("driver core: have match() callback in struct bus_type take a const *")
which touched include/linux/eisa.h.

> For what it's worth, it looks fine to me.

Thanks!

--
Kees Cook