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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 27 Nov 2023 10:24:16 -0600
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Jeff Johnson <quic_jjohnson@...cinc.com>,
        Kalle Valo <kvalo@...nel.org>
Cc:     "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Kees Cook <keescook@...omium.org>, ath10k@...ts.infradead.org,
        ath11k@...ts.infradead.org, linux-wireless@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] wifi: ath10k: Use DECLARE_FLEX_ARRAY() for
 ath10k_htc_record



On 11/27/23 10:14, Jeff Johnson wrote:
> Transform the zero-length arrays in ath10k_htc_record into proper
> flexible arrays via the DECLARE_FLEX_ARRAY() macro. This helps with
> ongoing efforts to globally enable -Warray-bounds.
> 
> Signed-off-by: Jeff Johnson <quic_jjohnson@...cinc.com>

Reviewed-by: Gustavo A. R. Silva <gustavoars@...nel.org>

Thanks
--
Gustavo

> ---
>   drivers/net/wireless/ath/ath10k/htc.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
> index 9cbb901d35e5..c6c392f8630c 100644
> --- a/drivers/net/wireless/ath/ath10k/htc.h
> +++ b/drivers/net/wireless/ath/ath10k/htc.h
> @@ -246,9 +246,9 @@ struct ath10k_htc_lookahead_bundle {
>   struct ath10k_htc_record {
>   	struct ath10k_ath10k_htc_record_hdr hdr;
>   	union {
> -		struct ath10k_htc_credit_report credit_report[0];
> -		struct ath10k_htc_lookahead_report lookahead_report[0];
> -		struct ath10k_htc_lookahead_bundle lookahead_bundle[0];
> +		DECLARE_FLEX_ARRAY(struct ath10k_htc_credit_report, credit_report);
> +		DECLARE_FLEX_ARRAY(struct ath10k_htc_lookahead_report, lookahead_report);
> +		DECLARE_FLEX_ARRAY(struct ath10k_htc_lookahead_bundle, lookahead_bundle);
>   	};
>   } __packed __aligned(4);
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ