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: <20250619113743.GE587864@google.com>
Date: Thu, 19 Jun 2025 12:37:43 +0100
From: Lee Jones <lee@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Tobias Junghans <tobias.junghans@...ub.de>, linux-leds@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] leds: trigger: netdev: refactor
 netdev_event_requires_handling()

On Thu, 12 Jun 2025, Andrew Lunn wrote:

> On Tue, Jun 10, 2025 at 01:40:20PM +0200, Tobias Junghans wrote:
> > If there are network devices with the same name in different
> > namespaces, ledtrig-netdev gets confused easily and switches between
> > these devices whenever there are NETDEV_CHANGENAME/NETDEV_REGISTER
> > notifications.  This happens since ledtrig-netdev only checks for
> > device name equality regardless of previous associations with another
> > network device with the same name.
> > 
> > Real world example: eth0 is the primary physical network interface and
> > ledltrig-netdev is associated with that interface. If now Docker creates
> > a virtual Ethernet interface (vethXXXX), moves it to the
> > container's net namespace and renames it to eth0, ledtrig-netdev
> > switches to this device and the LED no longer blinks for the original
> > (physical) network device.
> > 
> > Fix this by refactoring the conditions under which to handle netdev
> > events:
> > 
> > - For processing NETDEV_REGISTER events, the device name has to match
> >   and no association with a net_dev must exist.
> 
> Sorry for taking a while to review this. It took me a while to think
> it through and produce a list of use cases. And might still be missing
> some.
> 
> Given the complexity here, i actually think we need verbose comments
> in the code.

Thanks Andrew - I'll leave it with you.   =:-)

[...]

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ