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]
Date:   Wed, 6 Oct 2021 00:06:58 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Marek BehĂșn <kabel@...nel.org>
Cc:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Rob Herring <robh+dt@...nel.org>, Pavel Machek <pavel@....cz>,
        "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: lets settle the LED `function` property regarding the netdev
 trigger

> > I suggest we start with simple independent LEDs. That gives enough to
> > support the majority of use cases people actually need. And is enough
> > to unblock people who i keep NACKing patches and tell them to wait for
> > this work to get merged.
> 
> Of course, and I plan to do so. Those netdev trigger extensions and
> multi-color function definitions are for later :)

Great.
 
> We got side tracked in this discussion, sorry about that.
> 
> In this thread I just wanted to settle the LED function property for
> LEDs indicating network ports.
> 
> So would you, Andrew, agree with:
> - extending function property to be array of strings instead of only
>   one string, so that we can do
>     function = "link", "activity";

I agree with having a list, and we use the combination. If the
combination is not possible by the hardware, then -EINVAL, or
-EOPNOTSUPP.

> - having separate functions for different link modes
>     function = "link1000", "link100";

I would suggest this, so you can use 

function = "link1000", "link100", "activity"

What could be interesting is how you do this in sysfs?  How do you
enumerate what the hardware can do? How do you select what you want?

Do you need to do

echo "link1000 link100 activity" > /sys/class/net/eth0/phy/led/function

And we can have something like

cat /sys/class/net/eth0/phy/led/function
activity
link10 activity
link100 activity
link1000 activity
[link100 link1000 activity]
link10
link100
link1000

each line being a combination the hardware supports, and the line in
[] is the currently select function.

   Andrew




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ