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: <20210211105026.GA45458@LEGION>
Date:   Thu, 11 Feb 2021 15:50:26 +0500
From:   Muhammad Usama Anjum <musamaanjum@...il.com>
To:     jerome.pouiller@...abs.com, gregkh@...uxfoundation.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc:     musamaanjum@...il.com
Subject: [PATCH] staging: wfx: avoid defining array of flexible struct

In this particular case, the struct element is already flexible struct.
Thus struct element ie[] is ambiguous inside another struct. The members
of struct element ie aren't being accessed in code anywhere. The data of
u8 type is copied in it. So it has been changed to u8 ie[] to make the
sparse happy and code simple.

Warning from sparse:
drivers/stagingwfx/hif_tx.c: note: in included file (through drivers/stagingwfx/data_tx.h, drivers/staging//wfx/wfx.h):
drivers/staging//wfx/hif_api_cmd.h:103:26: warning: array of flexible structures

Signed-off-by: Muhammad Usama Anjum <musamaanjum@...il.com>
---
 drivers/staging/wfx/hif_api_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h
index 11bc1a58edae..58c9bb036011 100644
--- a/drivers/staging/wfx/hif_api_cmd.h
+++ b/drivers/staging/wfx/hif_api_cmd.h
@@ -100,7 +100,7 @@ struct hif_req_update_ie {
 	u8     reserved1:5;
 	u8     reserved2;
 	__le16 num_ies;
-	struct element ie[];
+	u8     ie[];
 } __packed;
 
 struct hif_cnf_update_ie {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ