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: <20141118142242.GC24004@x1>
Date:	Tue, 18 Nov 2014 14:22:42 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	Javier Martinez Canillas <javier.martinez@...labora.co.uk>
Cc:	Doug Anderson <dianders@...omium.org>,
	Bill Richardson <wfrichar@...omium.org>,
	Olof Johansson <olof@...om.net>, Simon Glass <sjg@...gle.com>,
	Gwendal Grignou <gwendal@...gle.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] mfd: cros_ec: Expose Chrome OS Lightbar to users

On Mon, 17 Nov 2014, Javier Martinez Canillas wrote:

> From: Bill Richardson <wfrichar@...omium.org>
> 
> This adds some sysfs entries to provide userspace control of the
> four-element LED "lightbar" on the Chromebook Pixel. This only instantiates
> the lightbar controls if the device actually exists.
> 
> To prevent DoS attacks, this interface is limited to 20 accesses/second,
> although that rate can be adjusted by a privileged user.
> 
> On Chromebooks without a lightbar, this should have no effect. On the
> Chromebook Pixel, you should be able to do things like this:
> 
>     $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
>     $ echo 0x80 > brightness
>     $ echo 255 > brightness
>     $
>     $ cat sequence
>     S0
>     $ echo konami > sequence
>     $ cat sequence
>     KONAMI
>     $
>     $ cat sequence
>     S0
> 
> And
> 
>     $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
>     $ echo stop > sequence
>     $ echo "4 255 255 255" > led_rgb
>     $ echo "0 255 0 0  1 0 255 0  2 0 0 255  3 255 255 0" > led_rgb
>     $ echo run  > sequence
> 
> Test the DoS prevention with this:
> 
>     $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
>     $ echo 500 > interval_msec
>     $ time (cat version version version version version version version)
> 
> Signed-off-by: Bill Richardson <wfrichar@...omium.org>
> Reviewed-by: Olof Johansson <olofj@...omium.org>
> Tested-by: Doug Anderson <dianders@...omium.org>
> Reviewed-by: Benson Leung <bleung@...omium.org>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
> ---
>  drivers/mfd/Makefile           |   2 +-
>  drivers/mfd/cros_ec_dev.c      |   2 +
>  drivers/mfd/cros_ec_dev.h      |   3 +
>  drivers/mfd/cros_ec_lightbar.c | 347 +++++++++++++++++++++++++++++++++++++++++

By the sounds of the description, it doesn't seem as though this
driver lives in MFD.  I suggest another home, such as drivers/led.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ