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:	Tue, 1 Dec 2009 16:17:50 +0100
From:	Jesper Nilsson <jesper.nilsson@...s.com>
To:	Jeff Garzik <jeff@...zik.org>, netdev@...r.kernel.org
Subject: [PATCH] Update embedded copy of ethtool.h from kernel 2.6.30

Commit 0c09c1a49cc7b819b33566a49d9901f7cfdd6889 in the Linux kernel
added a new field mdio_support inside the struct ethtool_cmd,
changing the struct size for architectures that does not pad structs.
(for example the CRIS architecture)

This size mismatch lead to the ethtool_cmd struct being written
as 44 bytes in the kernel, but only 43 bytes allocated on stack,
overwriting one byte in the stack frame.

Update the ethtool copy of the definition to match the 2.6.30 kernel.

Signed-off-by: Jesper Nilsson <jesper.nilsson@...s.com>

---
 ethtool-copy.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ethtool-copy.h b/ethtool-copy.h
index eadba25..fa92515 100644
--- a/ethtool-copy.h
+++ b/ethtool-copy.h
@@ -23,11 +23,14 @@ struct ethtool_cmd {
 	__u8	phy_address;
 	__u8	transceiver;	/* Which transceiver to use */
 	__u8	autoneg;	/* Enable or disable autonegotiation */
+	__u8	mdio_support;
 	__u32	maxtxpkt;	/* Tx pkts before generating tx int */
 	__u32	maxrxpkt;	/* Rx pkts before generating rx int */
 	__u16	speed_hi;
-	__u16	reserved2;
-	__u32	reserved[3];
+	__u8	eth_tp_mdix;
+	__u8	reserved2;
+	__u32	lp_advertising;	/* Features the link partner advertises */
+	__u32	reserved[2];
 };
 
 static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
-- 
1.6.4.GIT

/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@...s.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ