Re: [PATCH v3] net: macb: Add __nonstring annotations for unterminated strings

2025-03-19 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Paolo Abeni : On Wed, 12 Mar 2025 13:07:01 -0700 you 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

Re: [PATCH v3] net: macb: Add __nonstring annotations for unterminated strings

2025-03-13 Thread Kees Cook
On Thu, Mar 13, 2025 at 02:25:09PM +0100, Andrew Lunn wrote: > > struct gem_statistic { > > - char stat_string[ETH_GSTRING_LEN]; > > + char stat_string[ETH_GSTRING_LEN] __nonstring; > > This general pattern of a char foo[ETH_GSTRING_LEN]' will appear > throughout drivers/net/ethernet. Maybe C

Re: [PATCH v3] net: macb: Add __nonstring annotations for unterminated strings

2025-03-13 Thread Andrew Lunn
> struct gem_statistic { > - char stat_string[ETH_GSTRING_LEN]; > + char stat_string[ETH_GSTRING_LEN] __nonstring; This general pattern of a char foo[ETH_GSTRING_LEN]' will appear throughout drivers/net/ethernet. Maybe Coccinelle can find them all and add the __nonstring ? Reviewed-by: A

[PATCH v3] net: macb: Add __nonstring annotations for unterminated strings

2025-03-13 Thread Kees Cook
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 correctly identify the char array as "not a C string" and thereby el

Re: [PATCH v3] net: macb: Add __nonstring annotations for unterminated strings

2025-03-12 Thread Jacob Keller
On 3/12/2025 1:07 PM, 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 correctly identify