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-next>] [day] [month] [year] [list]
Message-ID: <20231205-flexarray-htc_record-v2-1-fbb56d436951@quicinc.com>
Date:   Tue, 5 Dec 2023 13:00:17 -0800
From:   Jeff Johnson <quic_jjohnson@...cinc.com>
To:     Kalle Valo <kvalo@...nel.org>
CC:     "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        <ath11k@...ts.infradead.org>, <linux-wireless@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        "Jeff Johnson" <quic_jjohnson@...cinc.com>
Subject: [PATCH v2] wifi: ath11k: Fix ath11k_htc_record flexible record

Transform the zero-length ath11k_htc_record::credit_report array into
a proper flexible array. Since this is the only array in
ath11k_htc_record, remove the unnecessary union.

Signed-off-by: Jeff Johnson <quic_jjohnson@...cinc.com>
---
Changes in v2:
- Original patches 1/4 2/4 3/4 already accepted
- This is original patch 4/4, updated to incorporate Gustavo's review
  comment, removing the `union` and just do a direct transformation
  [0] -> [ ]
- Link to v1: https://lore.kernel.org/r/20231127-flexarray-htc_record-v1-0-6be1f36126fd@quicinc.com
---
 drivers/net/wireless/ath/ath11k/htc.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/htc.h b/drivers/net/wireless/ath/ath11k/htc.h
index d5864a35e75b..86f77eacaea7 100644
--- a/drivers/net/wireless/ath/ath11k/htc.h
+++ b/drivers/net/wireless/ath/ath11k/htc.h
@@ -151,9 +151,7 @@ struct ath11k_htc_credit_report {
 
 struct ath11k_htc_record {
 	struct ath11k_htc_record_hdr hdr;
-	union {
-		struct ath11k_htc_credit_report credit_report[0];
-	};
+	struct ath11k_htc_credit_report credit_report[];
 } __packed __aligned(4);
 
 enum ath11k_htc_svc_gid {

---
base-commit: c8a5f34ad811743d1b3aeb5c54198eebd413bc6d
change-id: 20231116-flexarray-htc_record-ae46f039d4bf

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ