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] [day] [month] [year] [list]
Message-ID: <20250227094800.7ff48a71@fedora.home>
Date: Thu, 27 Feb 2025 09:48:00 +0100
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Stanislav Fomichev <sdf@...ichev.me>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, Saeed Mahameed <saeed@...nel.org>
Subject: Re: [PATCH net-next v8 08/12] net: ethtool: try to protect all
 callback with netdev instance lock

Hi,

On Wed, 26 Feb 2025 13:11:04 -0800
Stanislav Fomichev <sdf@...ichev.me> wrote:

> From: Jakub Kicinski <kuba@...nel.org>
> 
> Protect all ethtool callbacks and PHY related state with the netdev
> instance lock, for drivers which want / need to have their ops
> instance-locked. Basically take the lock everywhere we take rtnl_lock.
> It was tempting to take the lock in ethnl_ops_begin(), but turns
> out we actually nest those calls (when generating notifications).
> 
> Cc: Saeed Mahameed <saeed@...nel.org>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Stanislav Fomichev <sdf@...ichev.me>
> ---
>  drivers/net/netdevsim/ethtool.c |  2 --
>  net/dsa/conduit.c               | 16 +++++++++++++++-
>  net/ethtool/cabletest.c         | 20 ++++++++++++--------
>  net/ethtool/cmis_fw_update.c    |  7 ++++++-
>  net/ethtool/features.c          |  6 ++++--
>  net/ethtool/ioctl.c             |  6 ++++++
>  net/ethtool/module.c            |  8 +++++---
>  net/ethtool/netlink.c           | 12 ++++++++++++
>  net/ethtool/phy.c               | 20 ++++++++++++++------
>  net/ethtool/rss.c               |  2 ++
>  net/ethtool/tsinfo.c            |  9 ++++++---
>  net/sched/sch_taprio.c          |  5 ++++-
>  12 files changed, 86 insertions(+), 27 deletions(-)

FWIW I've tested that patchset with various PHY-related ethtool ops as
well as the module ops and didn't notice any issue or strangeness.

So to some extent,

Tested-by: Maxime Chevallier <maxime.chevallier@...tlin.com>

Thanks,

Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ