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]
Message-ID: <0d0a030c-b1ba-77a7-71f5-55448f6797f6@marvell.com>
Date: Tue, 6 Aug 2024 11:42:57 +0200
From: Igor Russkikh <irusskikh@...vell.com>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        "David S. Miller"
	<davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-hardening@...r.kernel.org>
Subject: Re: [EXTERNAL] [PATCH][next] net: atlantic: Aavoid
 -Wflex-array-member-not-at-end warnings



On 8/5/2024 5:32 PM, Gustavo A. R. Silva wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally. Move the conflicting declaration to
> the end of the structure. Notice that `struct hw_atl_utils_fw_rpc` ends in
> a flexible-array member
> 
> Fix the following warnings:
> 
> drivers/net/ethernet/aquantia/atlantic/aq_hw.h:197:36: warning: structure
> containing a flexible array member is not at the end of another structure
> [-Wflex-array-member-not-at-end]
> 
> drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:197:36: warning:
> structure containing a flexible array member is not at the end of another
> structure [-Wflex-array-member-not-at-end]

Hi Gustavo!

I was abit curious about this variable length structure, because it looks strange and not actually used by driver.

I've cross checked, and its really some outdated declaration. The structure is never used as as a flex sized struct.

So better would be to do just this:

--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
@@ -226,7 +226,6 @@ struct __packed offload_info {
        struct offload_port_info ports;
        struct offload_ka_info kas;
        struct offload_rr_info rrs;
-       u8 buf[];
 };

Let me know if you want to submit this, or I can do this as well.

Regards,
  Igor

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ