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:	Mon, 09 Jan 2012 15:09:15 +0800
From:	joeyli <jlee@...e.com>
To:	Corentin Chary <corentin.chary@...il.com>
Cc:	platform-driver-x86@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	Matthew Garrett <mjg@...hat.com>, linux-input@...r.kernel.org,
	GLin@...e.com
Subject: Re: Handling special keys in platform drivers

Hi Corentin, 

於 一,2012-01-09 於 07:24 +0100,Corentin Chary 提到:
> Hi,
> 
> Some of the platform drivers in platform/x86/ (and probably other) are
> relaying keys to userspace and are also controlling the device
> associated to these key. A simple example is screen brightness,
> keyboard backlight or rfkill.
> 
> In this case the driver send a key to userspace, userspace has to
> handle this key and control the right device.
> 
> Most of the time, this job is done by:
> - ACPI scripts (legacy)
> - DE (gnome-power-manager, kde's solid)
> 
> The real problem is that for keyboard backlight to work, it needs DE
> cooperation, and only gnome as implemented that right now, and other
> (except KDE) will probably neither have the resources to handle all
> the possible keys correctly. And of course, who should handle the keys
> when there is no DE running at all ?
> 
> So I was wondering if we could introduce an "auto" mode for this
> drivers. For example, with this mode enabled, asus-wmi would filter
> the keys and control keyboard backlight directly (and rfkill/screen
> brightness ?).
> 
> What do you think about it ?
> 
> Thanks,
> 

For backlight, 
I think control backlight in platform driver is generally no problem,
but need careful don't keep/change brightness level if BIOS also keep a
variable reflect to brightness level.

Another question is when the "auto" mode disable? Does it possible
disable it from user space?
Currently, like rfkill-input can disabled by ioctl from user space, e.g.
urfkill daemon will disable rfkill-input by ioctl when it launched.


For rfkill,
I am not prefer allow platform driver direct control rfkill.

that might more complex because already have the follow components
involve to it when function key pressed:
	BIOS/EC (ODM backup behavior)
	rfkill-input
	wireless/bluetooth drivers
	user space daemon/applications (e.g. NetworkManager, urfkill...)

Then, will platform driver also involve to rfkill control?

We already have rfkill-input in kernel to control rfkill state, if need
more flexible policy control on rfkill key, put policy logic in user
space will be better.
e.g. User can setup rfkill policy by account.


Thanks a lot!
Joey Lee


--
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