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: <20191002152828.GC1748000@kroah.com>
Date:   Wed, 2 Oct 2019 17:28:28 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Akinobu Mita <akinobu.mita@...il.com>
Cc:     linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>
Subject: Re: [PATCH -next 1/2] leds: add /sys/devices/virtual/led-trigger/

On Thu, Oct 03, 2019 at 12:13:00AM +0900, Akinobu Mita wrote:
> Reading /sys/class/leds/<led>/trigger returns all available LED triggers.
> However, this violates the "one value per file" rule of sysfs.
> 
> This makes led_triggers "real" devices and provides an
> /sys/devices/virtual/led-trigger/ directory that contains a sub-directoriy
> for each LED trigger device. The name of the sub-directory matches the LED
> trigger name.
> 
> We can find all available LED triggers by listing this directory contents.
> 
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> Cc: Jacek Anaszewski <jacek.anaszewski@...il.com>
> Cc: Pavel Machek <pavel@....cz>
> Cc: Dan Murphy <dmurphy@...com>
> Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
> ---
>  .../ABI/testing/sysfs-devices-virtual-led-trigger  |  8 +++
>  drivers/leds/led-triggers.c                        | 57 ++++++++++++++++++++++
>  include/linux/leds.h                               |  3 ++
>  3 files changed, 68 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-devices-virtual-led-trigger
> 
> diff --git a/Documentation/ABI/testing/sysfs-devices-virtual-led-trigger b/Documentation/ABI/testing/sysfs-devices-virtual-led-trigger
> new file mode 100644
> index 0000000..b8eb8f3
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-devices-virtual-led-trigger
> @@ -0,0 +1,8 @@
> +What:		/sys/devices/virtual/leds-trigger/
> +Date:		September 2019
> +KernelVersion:	5.5
> +Contact:	linux-leds@...r.kernel.org
> +Description:
> +		This directory contains a sub-directoriy for each LED trigger

"directoriy"?

> +		device. The name of the sub-directory matches the LED trigger
> +		name.

You are just creating directories here, and doing nothing with them,
why?  That seems kind of pointless.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ