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]
Date:   Wed, 30 Nov 2022 14:24:38 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Michael Jamet <michael.jamet@...el.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH net-next v2 1/2] Revert "net: thunderbolt: Use separate header data type for the Rx"

This reverts commit 9ad63a3dad65b984ba16f5841163457dec266be4.
---
v2: added tag (Mika)
 drivers/net/thunderbolt.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/drivers/net/thunderbolt.c b/drivers/net/thunderbolt.c
index 0fc2d9222a71..c73d419f1456 100644
--- a/drivers/net/thunderbolt.c
+++ b/drivers/net/thunderbolt.c
@@ -58,32 +58,12 @@
  * supported then @frame_id is filled, otherwise it stays %0.
  */
 struct thunderbolt_ip_frame_header {
-	__le32 frame_size;
-	__le16 frame_index;
-	__le16 frame_id;
-	__le32 frame_count;
-};
-
-/* Same as &struct thunderbolt_ip_frame_header for Rx */
-struct thunderbolt_ip_frame_rx_hdr {
 	u32 frame_size;
 	u16 frame_index;
 	u16 frame_id;
 	u32 frame_count;
 };
 
-static_assert(sizeof(struct thunderbolt_ip_frame_header) ==
-	      sizeof(struct thunderbolt_ip_frame_rx_hdr));
-
-#define TBIP_FRAME_HDR_MATCH(x)							 \
-	static_assert(offsetof(struct thunderbolt_ip_frame_header, frame_##x) == \
-		      offsetof(struct thunderbolt_ip_frame_rx_hdr, frame_##x))
-TBIP_FRAME_HDR_MATCH(size);
-TBIP_FRAME_HDR_MATCH(index);
-TBIP_FRAME_HDR_MATCH(id);
-TBIP_FRAME_HDR_MATCH(count);
-#undef TBIP_FRAME_HDR_MATCH
-
 enum thunderbolt_ip_frame_pdf {
 	TBIP_PDF_FRAME_START = 1,
 	TBIP_PDF_FRAME_END,
@@ -213,7 +193,7 @@ struct tbnet {
 	struct delayed_work login_work;
 	struct work_struct connected_work;
 	struct work_struct disconnect_work;
-	struct thunderbolt_ip_frame_rx_hdr rx_hdr;
+	struct thunderbolt_ip_frame_header rx_hdr;
 	struct tbnet_ring rx_ring;
 	atomic_t frame_id;
 	struct tbnet_ring tx_ring;
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ