Re: [PATCH] wifi: mac80211: Add __nonstring annotations for unterminated strings

2025-03-11 Thread Kees Cook
On Tue, Mar 11, 2025 at 10:25:10AM +0100, Johannes Berg wrote: > On Mon, 2025-03-10 at 15:23 -0700, Kees Cook wrote: > > > > drivers/net/wireless/virtual/virt_wifi.c | 2 +- > > drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +- > > > > That's not mac80211? Hrm, you're right. The automati

Re: [PATCH] wifi: mac80211: Add __nonstring annotations for unterminated strings

2025-03-11 Thread Johannes Berg
On Mon, 2025-03-10 at 15:23 -0700, Kees Cook wrote: > > drivers/net/wireless/virtual/virt_wifi.c | 2 +- > drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +- > That's not mac80211? Also, I have no idea how you came up with the CC list but it seems excessive. :) johannes

[PATCH] wifi: mac80211: Add __nonstring annotations for unterminated strings

2025-03-10 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 and correctly identify the char array as "not a C string" and thereb