[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241115204308.3821419-2-kees@kernel.org>
Date: Fri, 15 Nov 2024 12:43:04 -0800
From: Kees Cook <kees@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Kees Cook <kees@...nel.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Andrew Lunn <andrew@...n.ch>,
"Kory Maincent (Dent Project)" <kory.maincent@...tlin.com>,
Michael Chan <michael.chan@...adcom.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Potnuri Bharat Teja <bharat@...lsio.com>,
Christian Benvenuti <benve@...co.com>,
Satish Kharat <satishkh@...co.com>,
Manish Chopra <manishc@...vell.com>,
Simon Horman <horms@...nel.org>,
Edward Cree <ecree.xilinx@...il.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Ahmed Zaki <ahmed.zaki@...el.com>,
Rahul Rameshbabu <rrameshbabu@...dia.com>,
Ido Schimmel <idosch@...dia.com>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Takeru Hayasaka <hayatake396@...il.com>,
Jonathan Corbet <corbet@....net>,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: [PATCH 2/3] Revert "UAPI: ethtool: Use __struct_group() in struct ethtool_link_settings"
This reverts commit 43d3487035e9a86fad952de4240a518614240d43. We cannot
use tagged struct groups in UAPI because C++ will throw syntax errors
even under "extern C".
Signed-off-by: Kees Cook <kees@...nel.org>
---
Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>
---
include/uapi/linux/ethtool.h | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index fc1f54b065f9..c405ed63acfa 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -2511,24 +2511,21 @@ enum ethtool_reset_flags {
* autonegotiation; 0 if unknown or not applicable. Read-only.
*/
struct ethtool_link_settings {
- /* New members MUST be added within the __struct_group() macro below. */
- __struct_group(ethtool_link_settings_hdr, hdr, /* no attrs */,
- __u32 cmd;
- __u32 speed;
- __u8 duplex;
- __u8 port;
- __u8 phy_address;
- __u8 autoneg;
- __u8 mdio_support;
- __u8 eth_tp_mdix;
- __u8 eth_tp_mdix_ctrl;
- __s8 link_mode_masks_nwords;
- __u8 transceiver;
- __u8 master_slave_cfg;
- __u8 master_slave_state;
- __u8 rate_matching;
- __u32 reserved[7];
- );
+ __u32 cmd;
+ __u32 speed;
+ __u8 duplex;
+ __u8 port;
+ __u8 phy_address;
+ __u8 autoneg;
+ __u8 mdio_support;
+ __u8 eth_tp_mdix;
+ __u8 eth_tp_mdix_ctrl;
+ __s8 link_mode_masks_nwords;
+ __u8 transceiver;
+ __u8 master_slave_cfg;
+ __u8 master_slave_state;
+ __u8 rate_matching;
+ __u32 reserved[7];
__u32 link_mode_masks[];
/* layout of link_mode_masks fields:
* __u32 map_supported[link_mode_masks_nwords];
--
2.34.1
Powered by blists - more mailing lists