* Re: regression since 2.6.36: backlight in sony-laptop not working [not found] ` <20101118110445.GB4107@kamineko.org> @ 2010-11-18 13:34 ` Mattia Dongili 2010-11-18 18:06 ` Dmitry Torokhov 0 siblings, 1 reply; 2+ messages in thread From: Mattia Dongili @ 2010-11-18 13:34 UTC (permalink / raw) To: Dmitry Torokhov Cc: Norbert Preining, Matthew Garrett, linux-kernel, ACPI Devel Mailing List, Mauro Carvalho Chehab, linux-input On Thu, Nov 18, 2010 at 08:04:45PM +0900, Mattia Dongili wrote: > On Tue, Nov 16, 2010 at 10:52:52PM -0800, Dmitry Torokhov wrote: > > On Wed, Nov 17, 2010 at 03:33:38PM +0900, Norbert Preining wrote: > > > > - recompiled a input-kbd binary with a relaxed version check > > > > - if (EV_VERSION != version) { > > > > + if (EV_VERSION > version) { > > > > in input.c, line 104 of input-utils. > > > > > > Furthermore, although both of you referred to the fact that udev keymap > > > is working, I checked that Debian/sid uses udev kbd rules, but it > > > stopped working ... > > > > > > > Seems to be working here (I also verified that the keycodces are > > actually emitted with evtest): > > > > [root@dtor-d630 ~]# /lib/udev/keymap /dev/input/event3 0x87 wlan > > setting scancode 0x87 to key code 238 > > [root@dtor-d630 ~]# /lib/udev/keymap /dev/input/event3 0x87 battery > > setting scancode 0x87 to key code 236 > > [root@dtor-d630 ~]# uname -r > > 2.6.37-rc1+ > > [root@dtor-d630 ~]# > > ok I got the error. I'll see why the EVIOCSKEYCODE syscall is returning > -EINVAL. there is a typo in the large scancode support patch. This patch makes /lib/udev/keymap work again here on 2.6.37-rc2. commit a33950b5baa848ff7851b9efd4c5e2eaafd370f2 Author: Mattia Dongili <malattia@linux.it> Date: Thu Nov 18 22:20:36 2010 +0900 Input: fix typo in keycode validation supporting large scancodes Check the input_keymap_entry keycode size (u32) instead of the device's (void*). Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722 Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Mattia Dongili <malattia@linux.it> diff --git a/drivers/input/input.c b/drivers/input/input.c index 7f26ca6..5edc41a 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -753,7 +753,7 @@ static int input_default_setkeycode(struct input_dev *dev, if (index >= dev->keycodemax) return -EINVAL; - if (dev->keycodesize < sizeof(dev->keycode) && + if (dev->keycodesize < sizeof(ke->keycode) && (ke->keycode >> (dev->keycodesize * 8))) return -EINVAL; -- mattia :wq! ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: regression since 2.6.36: backlight in sony-laptop not working 2010-11-18 13:34 ` regression since 2.6.36: backlight in sony-laptop not working Mattia Dongili @ 2010-11-18 18:06 ` Dmitry Torokhov 0 siblings, 0 replies; 2+ messages in thread From: Dmitry Torokhov @ 2010-11-18 18:06 UTC (permalink / raw) To: Mattia Dongili Cc: Norbert Preining, Matthew Garrett, linux-kernel, ACPI Devel Mailing List, Mauro Carvalho Chehab, linux-input On Thu, Nov 18, 2010 at 10:34:20PM +0900, Mattia Dongili wrote: > On Thu, Nov 18, 2010 at 08:04:45PM +0900, Mattia Dongili wrote: > > On Tue, Nov 16, 2010 at 10:52:52PM -0800, Dmitry Torokhov wrote: > > > On Wed, Nov 17, 2010 at 03:33:38PM +0900, Norbert Preining wrote: > > > > > - recompiled a input-kbd binary with a relaxed version check > > > > > - if (EV_VERSION != version) { > > > > > + if (EV_VERSION > version) { > > > > > in input.c, line 104 of input-utils. > > > > > > > > Furthermore, although both of you referred to the fact that udev keymap > > > > is working, I checked that Debian/sid uses udev kbd rules, but it > > > > stopped working ... > > > > > > > > > > Seems to be working here (I also verified that the keycodces are > > > actually emitted with evtest): > > > > > > [root@dtor-d630 ~]# /lib/udev/keymap /dev/input/event3 0x87 wlan > > > setting scancode 0x87 to key code 238 > > > [root@dtor-d630 ~]# /lib/udev/keymap /dev/input/event3 0x87 battery > > > setting scancode 0x87 to key code 236 > > > [root@dtor-d630 ~]# uname -r > > > 2.6.37-rc1+ > > > [root@dtor-d630 ~]# > > > > ok I got the error. I'll see why the EVIOCSKEYCODE syscall is returning > > -EINVAL. > > there is a typo in the large scancode support patch. This patch makes > /lib/udev/keymap work again here on 2.6.37-rc2. > Applied, thanks Mattia. > commit a33950b5baa848ff7851b9efd4c5e2eaafd370f2 > Author: Mattia Dongili <malattia@linux.it> > Date: Thu Nov 18 22:20:36 2010 +0900 > > Input: fix typo in keycode validation supporting large scancodes > > Check the input_keymap_entry keycode size (u32) instead of the device's > (void*). > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722 > > Cc: Mauro Carvalho Chehab <mchehab@redhat.com> > Cc: Dmitry Torokhov <dtor@mail.ru> > Signed-off-by: Mattia Dongili <malattia@linux.it> > > diff --git a/drivers/input/input.c b/drivers/input/input.c > index 7f26ca6..5edc41a 100644 > --- a/drivers/input/input.c > +++ b/drivers/input/input.c > @@ -753,7 +753,7 @@ static int input_default_setkeycode(struct input_dev *dev, > if (index >= dev->keycodemax) > return -EINVAL; > > - if (dev->keycodesize < sizeof(dev->keycode) && > + if (dev->keycodesize < sizeof(ke->keycode) && > (ke->keycode >> (dev->keycodesize * 8))) > return -EINVAL; > > -- > mattia > :wq! -- Dmitry ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-18 18:06 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20101110035833.GB3029@kamineko.org> [not found] ` <20101111235000.GA6651@gamma.logic.tuwien.ac.at> [not found] ` <20101112034423.GA7407@srcf.ucam.org> [not found] ` <20101112035027.GD26742@gamma.logic.tuwien.ac.at> [not found] ` <20101112035732.GB7574@srcf.ucam.org> [not found] ` <20101112042243.GE2852@kamineko.org> [not found] ` <20101117063006.GF29129@gamma.logic.tuwien.ac.at> [not found] ` <20101117063338.GG29129@gamma.logic.tuwien.ac.at> [not found] ` <20101117065252.GA7046@core.coreip.homeip.net> [not found] ` <20101118110445.GB4107@kamineko.org> 2010-11-18 13:34 ` regression since 2.6.36: backlight in sony-laptop not working Mattia Dongili 2010-11-18 18:06 ` Dmitry Torokhov
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).