[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <164448278512.15541.969673068406323256.kvalo@kernel.org>
Date: Thu, 10 Feb 2022 08:46:26 +0000 (UTC)
From: Kalle Valo <kvalo@...nel.org>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: Arend van Spriel <aspriel@...il.com>,
Franky Lin <franky.lin@...adcom.com>,
Hante Meuleman <hante.meuleman@...adcom.com>,
Chi-hsien Lin <chi-hsien.lin@...ineon.com>,
Wright Feng <wright.feng@...ineon.com>,
Chung-hsien Hsu <chung-hsien.hsu@...ineon.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
linux-wireless@...r.kernel.org,
brcm80211-dev-list.pdl@...adcom.com,
SHA-cyfmac-dev-list@...ineon.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] brcmfmac: p2p: Replace one-element arrays with
flexible-array members
"Gustavo A. R. Silva" <gustavoars@...nel.org> wrote:
> There is a regular need in the kernel to provide a way to declare having
> a dynamically sized set of trailing elements in a structure. Kernel code
> should always use “flexible array members”[1] for these cases. The older
> style of one-element or zero-length arrays should no longer be used[2].
>
> This helps with the ongoing efforts to globally enable -Warray-bounds
> and get us closer to being able to tighten the FORTIFY_SOURCE routines
> on memcpy().
>
> This issue was found with the help of Coccinelle and audited and fixed,
> manually.
>
> [1] https://en.wikipedia.org/wiki/Flexible_array_member
> [2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays
>
> Link: https://github.com/KSPP/linux/issues/79
> Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
Patch applied to wireless-next.git, thanks.
f3c04fffe271 brcmfmac: p2p: Replace one-element arrays with flexible-array members
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220204232228.GA442895@embeddedor/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists