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:   Tue, 17 Dec 2019 22:08:18 +0100
From:   Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
To:     Jacek Anaszewski <jacek.anaszewski@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Pavel Machek <pavel@....cz>, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org, Dan Murphy <dmurphy@...com>,
        kernel@...gutronix.de, Jiri Slaby <jslaby@...e.com>,
        linux-leds@...r.kernel.org
Subject: Re: [PATCH v3 3/3] leds: trigger: implement a tty trigger

On Tue, Dec 17, 2019 at 09:27:13PM +0100, Jacek Anaszewski wrote:
> On 12/17/19 6:21 PM, Greg Kroah-Hartman wrote:
> > On Tue, Dec 17, 2019 at 05:23:13PM +0100, Uwe Kleine-König wrote:
> >> On Tue, Dec 17, 2019 at 04:27:24PM +0100, Greg Kroah-Hartman wrote:
> >>> On Tue, Dec 17, 2019 at 04:07:36PM +0100, Uwe Kleine-König wrote:
> >>>> Usage is as follows:
> >>>>
> >>>> 	myled=ledname
> >>>> 	tty=ttyS0
> >>>>
> >>>> 	echo tty > /sys/class/leds/$myled/trigger
> >>>> 	cat /sys/class/tty/$tty/dev > /sys/class/leds/$myled/dev
> >>>
> >>> Is this the correct instructions?  Aren't you looking for a major/minor
> >>> number instead in your sysfs file?
> >>
> >> This is correct, yes, at least it works as intended on my machine.
> >>
> >> /sys/class/tty/$tty/dev produces $major:$minor and that's what the
> >> led-trigger consumes.
> > 
> > Ugh, nevermind, I totally read that wrong, I was thinking "echo" instead
> > of cat.  My fault, what you wrote is correct.  Should that be documented
> > somewhere in a Documentation/ABI/ file so that people know how to use
> > this new sysfs file?  How are led triggers documented?
> 
> LED triggers have their corresponding entries in Documentation/ABI.
> 
> Uwe, you already did that for netdev trigger:
> 
> Documentation/ABI/testing/sysfs-class-led-trigger-netdev
> 
> It would be nice to have one for this too.
> 
> There are also less formal docs in Documentation/leds, e.g.:
> 
> Documentation/leds/ledtrig-usbport.rst

I'd put into Documentation/ABI/testing/sysfs-class-led-trigger-tty:

	What:           /sys/class/leds/<led>/dev
	Date:           Dec 2019
	KernelVersion:  5.6
	Contact:        linux-leds@...r.kernel.org
	Description:
			Specifies $major:$minor of the triggering tty

Does this look reasonable?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ