Discussion:
[Thinkfinger-devel] [PATCH] Allow other uinput locations to be used (no udev/other distros).
Jose Plans
2007-02-25 18:38:13 UTC
Permalink
Hi all,

This patch should allow systems without the udev rule or the misc/%k
one to use 0.2.3. http://belial.dead.li/~jmp/thinkfinger/0.2.3/

thanks,

Jose
Evgeni Golov
2007-02-25 18:57:33 UTC
Permalink
Post by Jose Plans
This patch should allow systems without the udev rule or the misc/%k
one to use 0.2.3. http://belial.dead.li/~jmp/thinkfinger/0.2.3/
Just wondering, why uinput should be aviable at all?
Uinput is a module in my kernel, and not loaded on boot, so the entry
in /dev isn't created. Shouldn't this be announced as a dependency?

Regards
Evgeni, still no success with 0.2.3 :(
--
^^^ | Evgeni -SargentD- Golov (***@die-welt.net)
d(O_o)b | GPG/PGP-Key-ID: 0xAC15B50C
Post by Jose Plans
-|-< | 0C04 F872 0963 ADC9 AA83 882B 24A0 1418 AC15 B50C
/ \ | http://www.die-welt.net - ***@jabber.ccc.de
Jose Plans
2007-02-25 19:09:02 UTC
Permalink
Post by Evgeni Golov
Post by Jose Plans
This patch should allow systems without the udev rule or the misc/%k
one to use 0.2.3. http://belial.dead.li/~jmp/thinkfinger/0.2.3/
Just wondering, why uinput should be aviable at all?
Timo added it to avoid possible problems from 0.2.2. But I believe he's
the best person to explain why it was included :)
Post by Evgeni Golov
Uinput is a module in my kernel, and not loaded on boot, so the entry
in /dev isn't created. Shouldn't this be announced as a dependency?
In Fedora Core, I keep 0.2.2, so patches that I find in 0.2.3 I send
them back to this previous version. I added a message during the
installation :

---
** Warning: Fedora Core and RHEL do not include direct support for
uinput **
The rule /etc/udev/rules.d/thinkfinger.rules has been created.
You may need to load the uinput module as well.
---

If you are still using 0.2.2, you can grab patches from :

http://belial.dead.li/~jmp/thinkfinger/

(do not assume they are or will be part of the upstream code!)

And this might change of course, I'm trying to find the best way for
this package to fit in Fedora Core.

Jose
Evgeni Golov
2007-02-25 19:31:29 UTC
Permalink
Post by Jose Plans
Post by Evgeni Golov
Just wondering, why uinput should be aviable at all?
Timo added it to avoid possible problems from 0.2.2. But I believe
he's the best person to explain why it was included :)
Nope, what I meant is:
uinput is not mentioned neither in INSTALL nor in README, and as it is
a module, it isn't loaded (at least on my thinkpad) without a "modprobe
uinput". And without the module pam does not work.
Timo, PLEASE add a big hint on this somewhere in the README.

Damn, just got a nice kernel-oops after removing uinput and trying pam.
Will see later if I can reproduce this :(

By the way, the module_use_count is increased everytime I use
pam-thinkfinger, so the module isn't removable without --force anymoe.
This is followed by
input: Virtual ThinkFinger Keyboard as /class/input/inputX
in dmesg, where X is an increasing number.
--
^^^ | Evgeni -SargentD- Golov (***@die-welt.net)
d(O_o)b | GPG/PGP-Key-ID: 0xAC15B50C
Post by Jose Plans
-|-< | 0C04 F872 0963 ADC9 AA83 882B 24A0 1418 AC15 B50C
/ \ | http://www.die-welt.net - ***@jabber.ccc.de
Evgeni Golov
2007-02-25 19:35:37 UTC
Permalink
Post by Evgeni Golov
Will see later if I can reproduce this :(
It IS reproducable:
modprobe uinput
use pam-thinkfinger
rmmod --force uinput
try to use pam-thinkfinger

get: BUG: unable to handle kernel paging request at virtual address
f8f111d4
--
^^^ | Evgeni -SargentD- Golov (***@die-welt.net)
d(O_o)b | GPG/PGP-Key-ID: 0xAC15B50C
Post by Evgeni Golov
-|-< | 0C04 F872 0963 ADC9 AA83 882B 24A0 1418 AC15 B50C
/ \ | http://www.die-welt.net - ***@jabber.ccc.de
Jose Plans
2007-02-25 19:41:09 UTC
Permalink
Post by Evgeni Golov
Post by Jose Plans
Post by Evgeni Golov
Just wondering, why uinput should be aviable at all?
Timo added it to avoid possible problems from 0.2.2. But I believe
he's the best person to explain why it was included :)
uinput is not mentioned neither in INSTALL nor in README, and as it is
a module, it isn't loaded (at least on my thinkpad) without a "modprobe
uinput". And without the module pam does not work.
Timo, PLEASE add a big hint on this somewhere in the README.
Damn, just got a nice kernel-oops after removing uinput and trying pam.
Will see later if I can reproduce this :(
Please send the oops too.
Post by Evgeni Golov
By the way, the module_use_count is increased everytime I use
pam-thinkfinger, so the module isn't removable without --force anymoe.
This is followed by
input: Virtual ThinkFinger Keyboard as /class/input/inputX
in dmesg, where X is an increasing number.
And dmesg or how to reproduce ;-)

Thanks!

Jose
Timo Hoenig
2007-02-27 10:28:32 UTC
Permalink
Hi Evgeni,
Post by Evgeni Golov
uinput is not mentioned neither in INSTALL nor in README, and as it is
a module, it isn't loaded (at least on my thinkpad) without a "modprobe
uinput". And without the module pam does not work.
Timo, PLEASE add a big hint on this somewhere in the README.
Slowly, slowly. The preliminary code for 0.2.3 is not even in SVN. I
expected some noise due to the new approach using uinput. You can be
sure that I will be verbose about uinput in the documentation.
Post by Evgeni Golov
Damn, just got a nice kernel-oops after removing uinput and trying pam.
Will see later if I can reproduce this :(
User space should never trigger an kernel oops.
Post by Evgeni Golov
By the way, the module_use_count is increased everytime I use
pam-thinkfinger, so the module isn't removable without --force anymoe.
This is followed by
input: Virtual ThinkFinger Keyboard as /class/input/inputX
in dmesg, where X is an increasing number.
This sounds like an issue. I'll investigate.

Timo
Timo Hoenig
2007-02-27 12:17:51 UTC
Permalink
Post by Timo Hoenig
Post by Evgeni Golov
By the way, the module_use_count is increased everytime I use
pam-thinkfinger, so the module isn't removable without --force anymoe.
This is followed by
input: Virtual ThinkFinger Keyboard as /class/input/inputX
in dmesg, where X is an increasing number.
This sounds like an issue. I'll investigate.
I've fixed the refcount issue. Thanks for speaking up!

The increasing number for /class/input/inputX is not an issue, though.
You will see the same when hotplugging your USB mouse for example.

Timo
Evgeni Golov
2007-02-27 17:49:07 UTC
Permalink
Post by Timo Hoenig
I've fixed the refcount issue. Thanks for speaking up!
Nice, thanks. Could you share the code, so I can do some more testing?
Or is in in SVN already?
Post by Timo Hoenig
The increasing number for /class/input/inputX is not an issue, though.
You will see the same when hotplugging your USB mouse for example.
Well, when I replug my mouse, I actually do something, what the kernel
may understand as a new device. During the swipe I don't replug the
scanner.
However, if the refcount issue and the followed oopses are gone, it's
ok ;)
--
^^^ | Evgeni -SargentD- Golov (***@die-welt.net)
d(O_o)b | GPG/PGP-Key-ID: 0xAC15B50C
Post by Timo Hoenig
-|-< | 0C04 F872 0963 ADC9 AA83 882B 24A0 1418 AC15 B50C
/ \ | http://www.die-welt.net - ***@jabber.ccc.de
Timo Hoenig
2007-02-27 19:31:06 UTC
Permalink
Post by Evgeni Golov
Nice, thanks. Could you share the code, so I can do some more testing?
Or is in in SVN already?
Yes it is.
Post by Evgeni Golov
Well, when I replug my mouse, I actually do something, what the kernel
may understand as a new device.
So you are doing when using pam_thinkfinger. It uses uinput which
creates (virtual) devices. That is actually what uinput was implemented
for ;-) It perfectly integrates into the Linux input layer and thus
behaves as a real device.
Post by Evgeni Golov
During the swipe I don't replug the scanner.
But pam_thinkfinger re-plugs the virtual device.
Post by Evgeni Golov
However, if the refcount issue and the followed oopses are gone, it's
ok ;)
The oops was only caused because you have provoked the kernel driver to
cause an oops. Just try rmmod'ing an arbitrary module of which the
refcount is greater than zero.

Timo

Timo Hoenig
2007-02-27 10:23:39 UTC
Permalink
Post by Jose Plans
This patch should allow systems without the udev rule or the misc/%k
one to use 0.2.3. http://belial.dead.li/~jmp/thinkfinger/0.2.3/
Patch looks good. Will commit this to SVN.

Thanks,

Timo
Loading...