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: <20181112190554.GA13959@amd>
Date:   Mon, 12 Nov 2018 20:05:55 +0100
From:   Pavel Machek <pavel@....cz>
To:     Jacek Anaszewski <jacek.anaszewski@...il.com>
Cc:     linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, robh@...nel.org,
        Baolin Wang <baolin.wang@...aro.org>,
        Daniel Mack <daniel@...que.org>, Dan Murphy <dmurphy@...com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Oleh Kravchenko <oleg@....org.ua>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Simon Shields <simon@...eageos.org>,
        Xiaotong Lu <xiaotong.lu@...eadtrum.com>
Subject: Re: [PATCH 02/24] leds: core: Add support for composing LED class
 device names

Hi!

> >>> My system looks like this:
> >>>
> >>> input16::capslock    tpacpi::bay_active    tpacpi::standby
> >>> input16::numlock     tpacpi::dock_active   tpacpi::thinklight
> >>> input16::scrolllock  tpacpi::dock_batt	      tpacpi::thinkvantage
> >>> input5::capslock     tpacpi::dock_status1  tpacpi::unknown_led
> >>> input5::numlock      tpacpi::dock_status2  tpacpi::unknown_led2
> >>> input5::scrolllock   tpacpi:green:batt	      tpacpi::unknown_led3

> > But it is not just for backwards compatibility. See my examples above,
> > it is needed to tell which device the LED is asociated with, and it is
> > absolutely required for USB devices (for example).
> 
> For USB devices there is already ledtrig-usbport available, which
> provides sysfs interface for defining and reading the usb ports,
> the status of which the LED indicates. Since the USB devices can be
> attached/removed dynamically, it would be impossible to reflect
> the associations in the LED class device name.

I'm not talking USB activity. I'm talking USB devices with LEDs on
them, like for example keyboards.

Please take a look at example above. input16::numlock ;
input5::numlock . You absolutely need device part.

> > And even for "embedded" stuff like routers, we want eth0:green:link,
> > eth0:yellow:activity and not some kind of hack.
> 
> eth0 is not something you can be certain of at the stage of defining DT
> node.

In the common case DT is used for, yes, you can, because whole system
is in one box.

(And really DT does not matter. We are talking kernel <-> user
interface here).

> > Ideally, colors would come from fixed list, functions would come from
> > fixed list, and device part would come from name used elsewhere in the
> > kernel.
> > 
> > (And yes, it probably means we should have something in device tree to
> > link LED to its device. device = "name" would be good start...)
> 
> Why would you need such link?

Because userspace needs that information?

Say you have raid array, with "error" leds for each drive (your list
already contains "hdderr"). Now userland detects problem with hdparm
on /dev/sdi. It would like to turn on corresponding LED.

How do you propose we do that?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ