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] [day] [month] [year] [list]
Message-ID: <20091025190726.GA20932@core.coreip.homeip.net>
Date:	Sun, 25 Oct 2009 12:07:26 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Éric Piel <Eric.Piel@...mplin-utc.net>
Cc:	Greg KH <gregkh@...e.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>
Subject: Re: [REGRESSION] "bind" a device to a driver doesn't not  work
	anymore

On Sun, Oct 25, 2009 at 12:47:03PM +0100, Éric Piel wrote:
> Op 23-10-09 18:31, Dmitry Torokhov schreef:
>>
>> Right, your init scripts/UDEV/HAL whatever adjust keymap to match your
>> laptop.
> :
>> Now, all depends on when this adjustment happens... In your case it
>> looks like X server starts before the keymap is adjusted, so on first
>> resume the keymaps are different and it disables the device.
> Ok, now I catch it. It's actually my own written script, which is  
> executed at init a bit after X starts. It does a couple of  
> "setkeycodes". So now the scenario is very clear: X starts, init script  
> do setkeycodes, resume/suspend, X detect a difference in keymaps and  
> disable the device.

Yep.

OK, so X's evdev is still too paranoid but now we know the whole picture
and for my part I declare kernel is free from blame ;)

>
> BTW, I haven't really found info about this: what does setkeycodes? It  
> does not work on a specific device, but still it changes keymap of some  
> specific devices. Does it change only the current devices which have  
> keys?

setkeycodes issues KDSETKEYCODE which goes through all devices bound to
the "kbd" input handler and sets keycode for the specified scan code for
all devices that support that scancode.

> Whenever a new input device appears, all the setkeycodes should be  
> re-executed?
>

It is recommended to adjust individual devices and HAL has facilities to
do that (although now that they deprecating HAL I am not sure what the
replacement is). Anyway, for HAL look into:

	/usr/share/hal/fdi/information/10freedesktop/*-keymap-*.fdi

The nice thing here is that keymaps are re-applied if device gets
disconnected and rediscovered for one reason or another.

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