netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2][next] wifi: brcmfmac: common: Replace one-element array with flexible-array member
@ 2022-11-15 21:52 Gustavo A. R. Silva
  2022-11-15 21:53 ` [PATCH 1/2][next] wifi: brcmfmac: replace one-element array with flexible-array member in struct brcmf_dload_data_le Gustavo A. R. Silva
  2022-11-15 21:55 ` [PATCH 2/2][next] wifi: brcmfmac: Use struct_size() in code ralated to " Gustavo A. R. Silva
  0 siblings, 2 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2022-11-15 21:52 UTC (permalink / raw)
  To: Hante Meuleman, Franky Lin, Arend van Spriel, Kalle Valo,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: SHA-cyfmac-dev-list, brcm80211-dev-list.pdl, netdev,
	linux-wireless, linux-kernel, Gustavo A. R. Silva,
	linux-hardening

Hi!

This series aims to replace a one-element array with flexible-array
member in drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
(in struct brcmf_dload_data_le) and use the struct_size() helper.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy() and help us make progress towards globally
enabling -fstrict-flex-arrays=3 [1].

Link: https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/230
Link: https://github.com/KSPP/linux/issues/79
Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1]

Gustavo A. R. Silva (2):
  wifi: brcmfmac: replace one-element array with flexible-array member
    in struct brcmf_dload_data_le
  wifi: brcmfmac: Use struct_size() in code ralated to struct
    brcmf_dload_data_le

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c  | 7 ++++---
 .../net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h  | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-22 10:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 21:52 [PATCH 0/2][next] wifi: brcmfmac: common: Replace one-element array with flexible-array member Gustavo A. R. Silva
2022-11-15 21:53 ` [PATCH 1/2][next] wifi: brcmfmac: replace one-element array with flexible-array member in struct brcmf_dload_data_le Gustavo A. R. Silva
2022-11-16 22:23   ` Kees Cook
2022-11-22 10:14   ` Kalle Valo
2022-11-15 21:55 ` [PATCH 2/2][next] wifi: brcmfmac: Use struct_size() in code ralated to " Gustavo A. R. Silva
2022-11-16 22:23   ` Kees Cook
2022-11-17  1:06     ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).