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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aEAerYw-5p8S4bHq@shredder>
Date: Wed, 4 Jun 2025 13:23:41 +0300
From: Ido Schimmel <idosch@...sch.org>
To: Yael Chemla <ychemla@...dia.com>
Cc: Jakub Kicinski <kuba@...nel.org>, Tariq Toukan <tariqt@...dia.com>,
	"David S. Miller" <davem@...emloft.net>,
	Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	Saeed Mahameed <saeedm@...dia.com>,
	Leon Romanovsky <leon@...nel.org>, netdev@...r.kernel.org,
	linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
	Moshe Shemesh <moshe@...dia.com>, Mark Bloch <mbloch@...dia.com>,
	Gal Pressman <gal@...dia.com>
Subject: Re: [PATCH net-next 2/2] net/mlx5e: Log error messages when extack
 is not present

On Wed, Jun 04, 2025 at 12:01:05AM +0300, Yael Chemla wrote:
> Ethtool APIs: While Netlink support was introduced around versions
> 5.6–5.8, many LTS distributions (e.g., Ubuntu 20.04, CentOS 7) still
> ship with older userspace ethtool utilities that rely on ioctl for
> certain operations. In these ioctl-based paths, the extack pointer
> passed down to the driver may legitimately be NULL.

[...]

> If a narrower scope is preferred, I can revise the patch to include only
> the ethtool-related changes, which were the primary motivation behind
> this work.

FWIW, there is a netlink extack tracepoint that is always triggered from
NL_SET_ERR_MSG(). Example:

ethtool$ ./configure --disable-netlink &> /dev/null
ethtool$ make -j14 &> /dev/null
# echo "10 1" > /sys/bus/netdevsim/new_device
# echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
# cat /sys/kernel/tracing/trace_pipe &
[1] 390
# ./ethtool --set-ring eni10np1 rx 1
         ethtool-413     [008] .....    80.588053: netlink_extack: msg=netdevsim: testing123

Used this dummy patch:

diff --git a/drivers/net/netdevsim/ethtool.c b/drivers/net/netdevsim/ethtool.c
index 4d191a3293c7..38022e8e1f37 100644
--- a/drivers/net/netdevsim/ethtool.c
+++ b/drivers/net/netdevsim/ethtool.c
@@ -85,6 +85,7 @@ static int nsim_set_ringparam(struct net_device *dev,
 {
 	struct netdevsim *ns = netdev_priv(dev);
 
+	NL_SET_ERR_MSG_MOD(extack, "testing123");
 	ns->ethtool.ring.rx_pending = ring->rx_pending;
 	ns->ethtool.ring.rx_jumbo_pending = ring->rx_jumbo_pending;
 	ns->ethtool.ring.rx_mini_pending = ring->rx_mini_pending;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ