lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <174240963487.1149743.12928700103940851464.git-patchwork-notify@kernel.org> Date: Wed, 19 Mar 2025 18:40:34 +0000 From: patchwork-bot+netdevbpf@...nel.org To: Kees Cook <kees@...nel.org> Cc: nicolas.ferre@...rochip.com, claudiu.beznea@...on.dev, andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org Subject: Re: [PATCH v3] net: macb: Add __nonstring annotations for unterminated strings Hello: This patch was applied to netdev/net-next.git (main) by Paolo Abeni <pabeni@...hat.com>: 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 "nonstring" attribute[1]. Mark the arrays > with __nonstring to correctly identify the char array as "not a C string" > and thereby eliminate the warning: > > In file included from ../drivers/net/ethernet/cadence/macb_main.c:42: > ../drivers/net/ethernet/cadence/macb.h:1070:35: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] > 1070 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames"), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../drivers/net/ethernet/cadence/macb.h:1050:24: note: in definition of macro 'GEM_STAT_TITLE_BITS' > 1050 | .stat_string = title, \ > | ^~~~~ > ../drivers/net/ethernet/cadence/macb.h:1070:9: note: in expansion of macro 'GEM_STAT_TITLE' > 1070 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames"), > | ^~~~~~~~~~~~~~ > ../drivers/net/ethernet/cadence/macb.h:1097:35: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] > 1097 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames"), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../drivers/net/ethernet/cadence/macb.h:1050:24: note: in definition of macro 'GEM_STAT_TITLE_BITS' > 1050 | .stat_string = title, \ > | ^~~~~ > ../drivers/net/ethernet/cadence/macb.h:1097:9: note: in expansion of macro 'GEM_STAT_TITLE' > 1097 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames"), > | ^~~~~~~~~~~~~~ > > [...] Here is the summary with links: - [v3] net: macb: Add __nonstring annotations for unterminated strings https://git.kernel.org/netdev/net-next/c/3d97da0ee625 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Powered by blists - more mailing lists