From: Ivo van Doorn <ivdoorn@gmail.com>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: linux-kernel@vger.kernel.org, Thomas Renninger <trenn@suse.de>,
Dmitry Torokhov <dtor@mail.ru>
Subject: Re: [PATCH 14/15] rfkill: do not allow userspace to override ALL RADIOS OFF
Date: Fri, 23 May 2008 16:15:33 +0200 [thread overview]
Message-ID: <200805231615.33414.IvDoorn@gmail.com> (raw)
In-Reply-To: <20080522205153.GA18483@khazad-dum.debian.net>
On Thursday 22 May 2008, Henrique de Moraes Holschuh wrote:
> On Tue, 20 May 2008, Ivo van Doorn wrote:
> > On Sunday 18 May 2008, Henrique de Moraes Holschuh wrote:
> > > SW_RFKILL_ALL is the "emergency power-off all radios" input event. It must
> > > be handled, and must always do the same thing as far as the rfkill system
> > > is concerned: all transmitters are to go *immediately* offline.
> >
> > I don't quite agree here. The SW_RFKILL_ALL key is the one send by thinkpad-acpi,
> > what makes that key so special that is has to be handled differently then a key
> > that only controls a single radio type?
>
> Well, first there is no KEY involved, it is a SWITCH :-) But that's not
> the reason it is special.
>
> What makes SW_RFKILL_ALL special, is that it is the kernel view of *The*
> RFKill Switch. SW_RFKILL_ALL is the event you get when the user
> manipulates the very *thing* that created the "rfkill switch" term.
So do keys that are pressed that only send the KEY_WLAN, KEY_BLUETOOTH or
KEY_UWB signals. They all indicate the key has been pressed and the radios
should be turned on/off.
> You get that event when someone moves that slider switch in the side/top
> of a laptop which has to kill all RF output in hardware as far as safety
> regulations go. Therefore, it refers to the only rfkill switch that has
> guidelines that say that it must always work, and that it must not be
> possible to override it in software.
That is a valid point, and rfkill is supposed to do that, but making
a difference between RFKILL_ALL and the individual types is wrong
because that won't result in a clearly defined expected behavior for all
rfkill keys.
> Too bad that doesn't apply to "removable" radio transmitters, like
> PCMCIA and ExpressCard WLAN cards, USB RF transmitters, and so on...
> probably, the user is expected to yank them off when he moves the switch
> to the "no radios working here!" position. Well, we can do better. We
> can make it apply to these other radio transmitters, too.
Through the write-only rfkill class right? ;)
> So yes, it *is* special when it is doing its "power DOWN the
> transmitters" function. It is not special at all when it is in the
> "allow radios to function if they want to" position, which is why I
> special-cased only the "OFF" state.
>
> IMHO, that makes it special enough to implement it in a different way
> that is not subject to, e.g., brain damage in userspace.
>
> As for thinkpad-acpi being the only in-tree code issuing that event so
> far, well... I have seen laptops from many vendors with that switch, and
> it is likely that the firmware of at least some of these laptops let you
> know the state of the switch (like the thinkpad firmware does), so I'd
> expect more users of SW_RFKILL_ALL to show up soon. I am just paving
> the way.
>
> That, and as an user, I'd really like to be able to implement a
> KEY_RFKILL_ALL keycode to use when I don't have a proper SW_RFKILL_ALL
> in my laptop. But one thing at a time. Small steps.
>
> > All keys should have the same rules when it is pressed, so either all keys should
> > force the change, or none of them should.
>
> IMO, "kill ALL radios" events are is the only kind of rfkill input event
> that have to *always work*, even if something in userspace tried to
> configure it not to.
Well the definition of "ALL radios" is the part that is the question, when the KEY_WLAN is
pressed it would be "ALL WLAN radios" and should still have the same rules for allowing
or disallowing userspace to overwrite the status.
Ivo
next prev parent reply other threads:[~2008-05-23 14:15 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-18 18:47 [RFC] rfkill class rework Henrique de Moraes Holschuh
2008-05-18 18:47 ` [PATCH 01/15] ACPI: thinkpad-acpi: fix initialization error paths Henrique de Moraes Holschuh
2008-05-18 18:47 ` [PATCH 02/15] ACPI: thinkpad-acpi: fix LED handling on older ThinkPads Henrique de Moraes Holschuh
2008-05-18 18:47 ` [PATCH 03/15] Input: rename SW_RADIO to SW_RFKILL_ALL (v2) Henrique de Moraes Holschuh
2008-05-18 18:47 ` [PATCH 04/15] rfkill: clarify meaning of rfkill states Henrique de Moraes Holschuh
2008-05-20 10:08 ` Ivo van Doorn
2008-05-18 18:47 ` [PATCH 05/15] rfkill: fix minor typo in kernel doc Henrique de Moraes Holschuh
2008-05-20 10:08 ` Ivo van Doorn
2008-05-18 18:47 ` [PATCH 06/15] rfkill: handle SW_RFKILL_ALL events Henrique de Moraes Holschuh
2008-05-20 10:08 ` Ivo van Doorn
2008-05-18 18:47 ` [PATCH 07/15] rfkill: add parameter to disable radios by default Henrique de Moraes Holschuh
2008-05-18 18:47 ` [PATCH 08/15] rfkill: add read-write rfkill switch support Henrique de Moraes Holschuh
2008-05-20 10:08 ` Ivo van Doorn
2008-05-18 18:47 ` [PATCH 09/15] rfkill: add the WWAN radio type Henrique de Moraes Holschuh
2008-05-20 10:08 ` Ivo van Doorn
2008-05-21 1:12 ` Henrique de Moraes Holschuh
2008-05-21 3:35 ` Inaky Perez-Gonzalez
2008-05-21 3:42 ` Henrique de Moraes Holschuh
2008-05-21 6:48 ` Inaky Perez-Gonzalez
2008-05-21 14:07 ` Henrique de Moraes Holschuh
2008-05-18 18:48 ` [PATCH 10/15] rfkill: rework suspend and resume handlers Henrique de Moraes Holschuh
2008-05-20 10:08 ` Ivo van Doorn
2008-05-18 18:48 ` [PATCH 11/15] rfkill: add notifier chains support Henrique de Moraes Holschuh
2008-05-19 8:44 ` Thomas Renninger
2008-05-19 13:10 ` Henrique de Moraes Holschuh
2008-05-20 10:09 ` Ivo van Doorn
2008-05-18 18:48 ` [PATCH 12/15] rfkill: add type string helper Henrique de Moraes Holschuh
2008-05-20 10:09 ` Ivo van Doorn
2008-05-18 18:48 ` [PATCH 13/15] rfkill: add uevent notifications Henrique de Moraes Holschuh
2008-05-20 10:09 ` Ivo van Doorn
2008-05-18 18:48 ` [PATCH 14/15] rfkill: do not allow userspace to override ALL RADIOS OFF Henrique de Moraes Holschuh
2008-05-20 10:09 ` Ivo van Doorn
2008-05-22 20:51 ` Henrique de Moraes Holschuh
2008-05-23 14:15 ` Ivo van Doorn [this message]
2008-05-27 14:08 ` Henrique de Moraes Holschuh
2008-05-27 14:38 ` Ivo van Doorn
2008-05-27 17:41 ` Henrique de Moraes Holschuh
2008-05-27 18:13 ` Ivo van Doorn
2008-05-18 18:48 ` [PATCH 15/15] rfkill: document rw rfkill switches and clarify input subsystem interactions Henrique de Moraes Holschuh
2008-05-19 17:51 ` Randy Dunlap
2008-05-19 22:04 ` Henrique de Moraes Holschuh
2008-05-19 22:52 ` Elias Oltmanns
2008-05-19 22:56 ` Randy Dunlap
2008-05-20 10:09 ` Ivo van Doorn
2008-05-20 15:54 ` Henrique de Moraes Holschuh
2008-05-20 17:18 ` Ivo van Doorn
2008-05-21 1:44 ` Henrique de Moraes Holschuh
2008-05-29 0:45 ` [PATCH 15/15] rfkill: document rw rfkill switches and clarify input subsystem interactions (v2) Henrique de Moraes Holschuh
2008-05-29 13:02 ` Ivo van Doorn
2008-05-29 16:26 ` Henrique de Moraes Holschuh
2008-05-29 17:19 ` Ivo van Doorn
2008-05-29 17:22 ` Henrique de Moraes Holschuh
2008-05-29 17:40 ` Ivo van Doorn
2008-05-29 17:46 ` Henrique de Moraes Holschuh
2008-05-29 18:58 ` Dmitry Torokhov
2008-05-29 21:16 ` Henrique de Moraes Holschuh
2008-05-29 21:25 ` [PATCH] Input: rename SW_RADIO to SW_RFKILL_ALL (v2) Henrique de Moraes Holschuh
2008-06-04 3:11 ` [PATCH 15/15] rfkill: document rw rfkill switches and clarify input subsystem interactions (v2) Henrique de Moraes Holschuh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200805231615.33414.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=dtor@mail.ru \
--cc=hmh@hmh.eng.br \
--cc=linux-kernel@vger.kernel.org \
--cc=trenn@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox