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: <20250703113022.1451223-2-jedrzej.jagielski@intel.com>
Date: Thu,  3 Jul 2025 13:30:22 +0200
From: Jedrzej Jagielski <jedrzej.jagielski@...el.com>
To: intel-wired-lan@...ts.osuosl.org
Cc: anthony.l.nguyen@...el.com,
	netdev@...r.kernel.org,
	jiri@...nulli.us,
	david.kaplan@....com,
	dhowells@...hat.com,
	Jedrzej Jagielski <jedrzej.jagielski@...el.com>,
	David Kaplan <David.Kaplan@....com>,
	Jakub Kicinski <kuba@...nel.org>,
	Przemek Kitszel <przemyslaw.kitszel@...el.com>
Subject: [PATCH iwl-net v1 2/2] ixgbe: prevent from unwanted interfaces names changes

Users of the ixgbe drivers report that after adding devlink
support by the commit a0285236ab93 ("ixgbe: add initial devlink support")
their configs got broken due to unwanted changes of interfaces names.
It's caused by changing names by devlink port initialization flow.

To prevent from that add an empty implementation of ndo_get_phys_port_name
callback.

Reported-by: David Howells <dhowells@...hat.com>
Closes: https://lkml.org/lkml/2025/4/24/2052
Reported-by: David Kaplan <David.Kaplan@....com>
Closes:https://www.spinics.net/lists/netdev/msg1099410.html
Suggested-by: Jakub Kicinski <kuba@...nel.org>
Acked-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Fixes: a0285236ab93 ("ixgbe: add initial devlink support")
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@...el.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 48063586063c..e63a1831e661 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -11043,6 +11043,12 @@ static int ixgbe_xdp_xmit(struct net_device *dev, int n,
 	return nxmit;
 }
 
+static int ixgbe_get_phys_port_name(struct net_device *netdev, char *name, size_t len)
+{
+	/* Avoid devlink adding unwanted suffix to interface name. */
+	return 0;
+}
+
 static const struct net_device_ops ixgbe_netdev_ops = {
 	.ndo_open		= ixgbe_open,
 	.ndo_stop		= ixgbe_close,
@@ -11088,6 +11094,7 @@ static const struct net_device_ops ixgbe_netdev_ops = {
 	.ndo_bpf		= ixgbe_xdp,
 	.ndo_xdp_xmit		= ixgbe_xdp_xmit,
 	.ndo_xsk_wakeup         = ixgbe_xsk_wakeup,
+	.ndo_get_phys_port_name = ixgbe_get_phys_port_name,
 };
 
 static void ixgbe_disable_txr_hw(struct ixgbe_adapter *adapter,
-- 
2.31.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ