linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Warning: evdev changes - no auto-grabs anymore
       [not found]         ` <20080815080247.GA17613@fooishbar.org>
@ 2008-08-15  8:26           ` Ville Syrjälä
  2008-08-15 14:10             ` Dmitry Torokhov
  0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2008-08-15  8:26 UTC (permalink / raw)
  To: Daniel Stone, Peter Hutterer, Michel Dänzer, xorg; +Cc: linux-input

On Fri, Aug 15, 2008 at 11:02:48AM +0300, Daniel Stone wrote:
> On Fri, Aug 15, 2008 at 09:51:59AM +0300, Ville Syrjälä wrote:
> > On Fri, Aug 15, 2008 at 09:54:58AM +0930, Peter Hutterer wrote:
> > > On Thu, Aug 14, 2008 at 01:50:09PM -0400, Adam Jackson wrote:
> > > > This is, in fact, one of the main reasons I put SIOCGRAB there in the
> > > > first place; you need to keep the keyboard's event stream out of the tty
> > > > layer entirely, not just out of reach of the kbd driver.  At the time
> > > > the argument was also that you wanted to keep them out of reach of
> > > > normal users so you couldn't snoop passwords, but now that there's a
> > > > ConsoleKit I think that's less true.
> > > > 
> > > > Mac mouse emulation we could probably just blacklist away from the evdev
> > > > driver.  rfkill is... harder?  Does it get its own event device or not?
> > > > I'd think it would have to get one kill device per wireless device.
> > > 
> > > The issue is not grabbing the mouse emulation device, it's grabbing the
> > > keyboard that generates those keys events that should result in a button click
> > > on a different device. So we'd need something in the kernel I guess.
> > 
> > I was pondering about the same issue wrt. DirectFB. I wonder if
> > KDSETMODE/KD_GRAPHICS could be extended to take care of this or
> > would it break some existing applications.
> 
> Yeah, I was thinking about that, but that would mean we have issues
> under older kernels. I think the best was what I was proposing, which
> would be EVIOCSERIOUSLYDONTSENDANYCONSOLEINPUTWEWILLDEALWITHIT().

Yeah that would be better since support for it could be detected runtime
so the driver could do the right thing when running with a recent kernel,
and it could just fall back to the normal grab with old kernels.

Let's cc the linux-input list...

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Warning: evdev changes - no auto-grabs anymore
  2008-08-15  8:26           ` Warning: evdev changes - no auto-grabs anymore Ville Syrjälä
@ 2008-08-15 14:10             ` Dmitry Torokhov
  2008-08-15 14:31               ` Daniel Stone
  2008-08-15 14:39               ` Ville Syrjälä
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2008-08-15 14:10 UTC (permalink / raw)
  To: Ville Syrj?l?
  Cc: Daniel Stone, Peter Hutterer, Michel D?nzer, xorg, linux-input

On Fri, Aug 15, 2008 at 11:26:29AM +0300, Ville Syrj?l? wrote:
> On Fri, Aug 15, 2008 at 11:02:48AM +0300, Daniel Stone wrote:
> > On Fri, Aug 15, 2008 at 09:51:59AM +0300, Ville Syrj?l? wrote:
> > > On Fri, Aug 15, 2008 at 09:54:58AM +0930, Peter Hutterer wrote:
> > > > On Thu, Aug 14, 2008 at 01:50:09PM -0400, Adam Jackson wrote:
> > > > > This is, in fact, one of the main reasons I put SIOCGRAB there in the
> > > > > first place; you need to keep the keyboard's event stream out of the tty
> > > > > layer entirely, not just out of reach of the kbd driver.  At the time
> > > > > the argument was also that you wanted to keep them out of reach of
> > > > > normal users so you couldn't snoop passwords, but now that there's a
> > > > > ConsoleKit I think that's less true.
> > > > > 
> > > > > Mac mouse emulation we could probably just blacklist away from the evdev
> > > > > driver.  rfkill is... harder?  Does it get its own event device or not?
> > > > > I'd think it would have to get one kill device per wireless device.
> > > > 
> > > > The issue is not grabbing the mouse emulation device, it's grabbing the
> > > > keyboard that generates those keys events that should result in a button click
> > > > on a different device. So we'd need something in the kernel I guess.
> > > 
> > > I was pondering about the same issue wrt. DirectFB. I wonder if
> > > KDSETMODE/KD_GRAPHICS could be extended to take care of this or
> > > would it break some existing applications.
> > 
> > Yeah, I was thinking about that, but that would mean we have issues
> > under older kernels. I think the best was what I was proposing, which
> > would be EVIOCSERIOUSLYDONTSENDANYCONSOLEINPUTWEWILLDEALWITHIT().
> 
> Yeah that would be better since support for it could be detected runtime
> so the driver could do the right thing when running with a recent kernel,
> and it could just fall back to the normal grab with old kernels.
> 

If evdev support in X is maturing why does it even need using tty and
mousedev multiplexors? If you just use evdev for all of your devices
you would not have the problem of duplicate events coming from 2
interfaces.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Warning: evdev changes - no auto-grabs anymore
  2008-08-15 14:10             ` Dmitry Torokhov
@ 2008-08-15 14:31               ` Daniel Stone
  2008-08-15 14:38                 ` Alan Cox
  2008-08-15 14:49                 ` Dmitry Torokhov
  2008-08-15 14:39               ` Ville Syrjälä
  1 sibling, 2 replies; 7+ messages in thread
From: Daniel Stone @ 2008-08-15 14:31 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, Michel D?nzer, xorg


[-- Attachment #1.1: Type: text/plain, Size: 1549 bytes --]

On Fri, Aug 15, 2008 at 10:10:10AM -0400, Dmitry Torokhov wrote:
> On Fri, Aug 15, 2008 at 11:26:29AM +0300, Ville Syrj?l? wrote:
> > On Fri, Aug 15, 2008 at 11:02:48AM +0300, Daniel Stone wrote:
> > > On Fri, Aug 15, 2008 at 09:51:59AM +0300, Ville Syrj?l? wrote:
> > > > I was pondering about the same issue wrt. DirectFB. I wonder if
> > > > KDSETMODE/KD_GRAPHICS could be extended to take care of this or
> > > > would it break some existing applications.
> > > 
> > > Yeah, I was thinking about that, but that would mean we have issues
> > > under older kernels. I think the best was what I was proposing, which
> > > would be EVIOCSERIOUSLYDONTSENDANYCONSOLEINPUTWEWILLDEALWITHIT().
> > 
> > Yeah that would be better since support for it could be detected runtime
> > so the driver could do the right thing when running with a recent kernel,
> > and it could just fall back to the normal grab with old kernels.
> 
> If evdev support in X is maturing why does it even need using tty and
> mousedev multiplexors? If you just use evdev for all of your devices
> you would not have the problem of duplicate events coming from 2
> interfaces.

We don't, and killing them is fine.  Even so, try doing that, and
realise that the TTY layer has helpfully spewed out every single thing
you've typed, oh, and Ctrl-C kills the X server.

So it would seem that an ioctl to say 'I'm dealing with this, don't let
the TTY layer and mousedev get at it' would be helpful, but one that
stops short of a full grab.

Cheers,
Daniel

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Warning: evdev changes - no auto-grabs anymore
  2008-08-15 14:31               ` Daniel Stone
@ 2008-08-15 14:38                 ` Alan Cox
  2008-08-15 14:49                 ` Dmitry Torokhov
  1 sibling, 0 replies; 7+ messages in thread
From: Alan Cox @ 2008-08-15 14:38 UTC (permalink / raw)
  To: Daniel Stone; +Cc: Dmitry Torokhov, Michel D?nzer, xorg, linux-input

> So it would seem that an ioctl to say 'I'm dealing with this, don't let
> the TTY layer and mousedev get at it' would be helpful, but one that
> stops short of a full grab.

There is a requirement for secure attention key processing in some
environments. Being able to divert the SAK key wouldn't be acceptable so
some care is needed.

Alan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Warning: evdev changes - no auto-grabs anymore
  2008-08-15 14:10             ` Dmitry Torokhov
  2008-08-15 14:31               ` Daniel Stone
@ 2008-08-15 14:39               ` Ville Syrjälä
  2008-08-15 14:49                 ` Samuel Thibault
  1 sibling, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2008-08-15 14:39 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Daniel Stone, Peter Hutterer, Michel D?nzer, xorg, linux-input

On Fri, Aug 15, 2008 at 10:10:10AM -0400, Dmitry Torokhov wrote:
> On Fri, Aug 15, 2008 at 11:26:29AM +0300, Ville Syrj?l? wrote:
> > On Fri, Aug 15, 2008 at 11:02:48AM +0300, Daniel Stone wrote:
> > > On Fri, Aug 15, 2008 at 09:51:59AM +0300, Ville Syrj?l? wrote:
> > > > On Fri, Aug 15, 2008 at 09:54:58AM +0930, Peter Hutterer wrote:
> > > > > On Thu, Aug 14, 2008 at 01:50:09PM -0400, Adam Jackson wrote:
> > > > > > This is, in fact, one of the main reasons I put SIOCGRAB there in the
> > > > > > first place; you need to keep the keyboard's event stream out of the tty
> > > > > > layer entirely, not just out of reach of the kbd driver.  At the time
> > > > > > the argument was also that you wanted to keep them out of reach of
> > > > > > normal users so you couldn't snoop passwords, but now that there's a
> > > > > > ConsoleKit I think that's less true.
> > > > > > 
> > > > > > Mac mouse emulation we could probably just blacklist away from the evdev
> > > > > > driver.  rfkill is... harder?  Does it get its own event device or not?
> > > > > > I'd think it would have to get one kill device per wireless device.
> > > > > 
> > > > > The issue is not grabbing the mouse emulation device, it's grabbing the
> > > > > keyboard that generates those keys events that should result in a button click
> > > > > on a different device. So we'd need something in the kernel I guess.
> > > > 
> > > > I was pondering about the same issue wrt. DirectFB. I wonder if
> > > > KDSETMODE/KD_GRAPHICS could be extended to take care of this or
> > > > would it break some existing applications.
> > > 
> > > Yeah, I was thinking about that, but that would mean we have issues
> > > under older kernels. I think the best was what I was proposing, which
> > > would be EVIOCSERIOUSLYDONTSENDANYCONSOLEINPUTWEWILLDEALWITHIT().
> > 
> > Yeah that would be better since support for it could be detected runtime
> > so the driver could do the right thing when running with a recent kernel,
> > and it could just fall back to the normal grab with old kernels.
> > 
> 
> If evdev support in X is maturing why does it even need using tty and
> mousedev multiplexors? If you just use evdev for all of your devices
> you would not have the problem of duplicate events coming from 2
> interfaces.

That's not the problem. The problem is that when using evdev without grabs
any keyboardish input also goes to the console. For stuff like ctrl-c it's
particularly nasty since it will result in the X server exiting.

This also affect DirectFB and it was the original reason why I added
EVIOCGRAB code to DirectFB's linux-input driver. Grabbing didn't cause
problems back then but now that the input subsystem is used by
rfkill/acpi/etc. functionalitys is lost when the devices are grabbed.

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Warning: evdev changes - no auto-grabs anymore
  2008-08-15 14:31               ` Daniel Stone
  2008-08-15 14:38                 ` Alan Cox
@ 2008-08-15 14:49                 ` Dmitry Torokhov
  1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2008-08-15 14:49 UTC (permalink / raw)
  To: Daniel Stone, Ville Syrj?l?, Peter Hutterer, Michel D?nzer,
	linux-input

On Fri, Aug 15, 2008 at 05:31:19PM +0300, Daniel Stone wrote:
> On Fri, Aug 15, 2008 at 10:10:10AM -0400, Dmitry Torokhov wrote:
> > On Fri, Aug 15, 2008 at 11:26:29AM +0300, Ville Syrj?l? wrote:
> > > On Fri, Aug 15, 2008 at 11:02:48AM +0300, Daniel Stone wrote:
> > > > On Fri, Aug 15, 2008 at 09:51:59AM +0300, Ville Syrj?l? wrote:
> > > > > I was pondering about the same issue wrt. DirectFB. I wonder if
> > > > > KDSETMODE/KD_GRAPHICS could be extended to take care of this or
> > > > > would it break some existing applications.
> > > > 
> > > > Yeah, I was thinking about that, but that would mean we have issues
> > > > under older kernels. I think the best was what I was proposing, which
> > > > would be EVIOCSERIOUSLYDONTSENDANYCONSOLEINPUTWEWILLDEALWITHIT().
> > > 
> > > Yeah that would be better since support for it could be detected runtime
> > > so the driver could do the right thing when running with a recent kernel,
> > > and it could just fall back to the normal grab with old kernels.
> > 
> > If evdev support in X is maturing why does it even need using tty and
> > mousedev multiplexors? If you just use evdev for all of your devices
> > you would not have the problem of duplicate events coming from 2
> > interfaces.
> 
> We don't, and killing them is fine.  Even so, try doing that, and
> realise that the TTY layer has helpfully spewed out every single thing
> you've typed, oh, and Ctrl-C kills the X server.
> 

[taking xorg list off as it does not take my posts...]

Would not putting VC in raw mode and just ignoring the data coming out
of it take care of this problem?

-- 
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Warning: evdev changes - no auto-grabs anymore
  2008-08-15 14:39               ` Ville Syrjälä
@ 2008-08-15 14:49                 ` Samuel Thibault
  0 siblings, 0 replies; 7+ messages in thread
From: Samuel Thibault @ 2008-08-15 14:49 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Dmitry Torokhov, Michel D?nzer, xorg, linux-input

Ville Syrjälä, le Fri 15 Aug 2008 17:39:21 +0300, a écrit :
> This also affect DirectFB and it was the original reason why I added
> EVIOCGRAB code to DirectFB's linux-input driver. Grabbing didn't cause
> problems back then but now that the input subsystem is used by
> rfkill/acpi/etc. functionalitys is lost when the devices are grabbed.

Also note that some (root-launched) daemons like brltty would like to be
notified of some given keyboard shortcut.  What they end up doing for
now is grabbing all the keyboard, and re-emiting all the keys through a
uinput.

Samuel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-08-15 14:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080814044337.GA11632@emu>
     [not found] ` <1218725645.907.27.camel@thor.sulgenrain.local>
     [not found]   ` <1218736209.4467.11.camel@localhost.localdomain>
     [not found]     ` <20080815002458.GA16836@emu>
     [not found]       ` <20080815065159.GA16680@sci.fi>
     [not found]         ` <20080815080247.GA17613@fooishbar.org>
2008-08-15  8:26           ` Warning: evdev changes - no auto-grabs anymore Ville Syrjälä
2008-08-15 14:10             ` Dmitry Torokhov
2008-08-15 14:31               ` Daniel Stone
2008-08-15 14:38                 ` Alan Cox
2008-08-15 14:49                 ` Dmitry Torokhov
2008-08-15 14:39               ` Ville Syrjälä
2008-08-15 14:49                 ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).