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: <Y4nEi1Q1iEYFdkht@duo.ucw.cz>
Date:   Fri, 2 Dec 2022 10:25:31 +0100
From:   Pavel Machek <pavel@....cz>
To:     Rob Herring <robh@...nel.org>
Cc:     Marek Vasut <marex@...x.de>,
        Christoph Niedermaier <cniedermaier@...electronics.com>,
        linux-kernel@...r.kernel.org,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        kernel@...electronics.com, linux-leds@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: leds: Mark label property as deprecated

Hi!

> > > > So far, the documentation states that "label" is deprecated, and users
> > > > should replace it with "function" and "color".
> > >
> > > 'function' is what activity/operation the LED is associated with. It is
> > > a fixed set of strings which s/w may use. It is a replacement for
> > > 'linux,default-trigger'.
> > >
> > > 'label' is what is printed next to the LED for a human to read. 'label'
> > > can be anything and the OS shouldn't care what it is.
> >
> > Unfortunately, no.
> 
> That's why I said 'shouldn't care', not 'doesn't care'.
> 
> 'label' is also not just an LED property. It's used elsewhere, but
> unfortunately the LED subsystem makes more use of it than it perhaps
> should.
> 
> > We use label as a path in /sys/class/leds.
> 
> Yes, or node name if no label. That's still not really caring what the
> value of label is. At least the kernel doesn't. A well behaved
> userspace wouldn't either and doesn't for most classes.

A well behaved userspace needs that to tell what kind of LED it is. It
is important to tell keyboard backlight from HDD activity LED and from
fllash on back camera for example.

> > And it looks like integer
> > "function" is not really adequate for describing what LED does. There
> > are too many LEDs and not enough integers, and it is common to have
> > same function ("activity") on multiple devices ("wifi", "mmc", "eth").
> 
> Whatever the problems are, 'label' is not the solution.
> 
> There is a way to associate leds with devices. 'trigger-source'
> IIRC.

Neither is trigger-source a solution.

Can we have linux,sysfs-path or something?

								Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ