linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: sysfs change of input/event devices in 2.6.23rc breaks udev
       [not found] <46E2D712.1010402@gmail.com>
@ 2007-09-08 18:29 ` Andrey Borzenkov
  2007-09-08 19:38   ` Anssi Hannula
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2007-09-08 18:29 UTC (permalink / raw)
  To: Anssi Hannula, linux-kernel, Dmitry Torokhov, linux-input,
	linux-hotplug-devel

Anssi Hannula wrote:

> Hi!
> 
> There seem to be changes in sysfs input structure between 2.6.22 and
> 2.6.23-rc5 which cause some breakage.
> 

I'm running 2.6.23-rc5 in up-to-date cooker.

> With 2.6.22:
> 
>> # LC_ALL=C ls -l /sys/class/input/input4
>> total 0
>> drwxr-xr-x 2 root root    0 Sep  8 12:51 capabilities/
>> lrwxrwxrwx 1 root root    0 Sep  8 19:48 device ->
>> ../../../devices/platform/pcspkr/
>> drwxr-xr-x 2 root root    0 Sep  8 12:51 event4/
>> drwxr-xr-x 2 root root    0 Sep  8 12:51 id/
>> -r--r--r-- 1 root root 4096 Sep  8 19:48 modalias
>> -r--r--r-- 1 root root 4096 Sep  8 19:48 name
>> -r--r--r-- 1 root root 4096 Sep  8 19:48 phys
>> lrwxrwxrwx 1 root root    0 Sep  8 19:48 subsystem ->
>> ../../../class/input/
>> --w------- 1 root root 4096 Sep  8 19:48 uevent
>> -r--r--r-- 1 root root 4096 Sep  8 19:48 uniq
> 
>> # ls -l /sys/class/input/event4
>> lrwxrwxrwx 1 root root 0 Sep  8 19:48 /sys/class/input/event4 ->
>> ../../class/input/input4/event4/
>> # ls -l /sys/class/input/event4/
>> total 0
>> -r--r--r-- 1 root root 4096 Sep  8 19:58 dev
>> lrwxrwxrwx 1 root root    0 Sep  8 19:58 device ->
>> ../../../../devices/platform/pcspkr/
>> lrwxrwxrwx 1 root root    0 Sep  8 19:58 subsystem ->
>> ../../../../class/input/
>> --w------- 1 root root 4096 Sep  8 19:58 uevent
> 
> With 2.6.23-rc5:
> 
>> # ls -l /sys/class/input/input5
>> total 0
>> drwxr-xr-x 2 root root    0 Sep  8 19:47 capabilities/
>> lrwxrwxrwx 1 root root    0 Sep  8 19:03 device ->
>> ../../../devices/platform/pcspkr/
>> drwxr-xr-x 2 root root    0 Sep  8 19:47 id/
>> lrwxrwxrwx 1 root root    0 Sep  8 19:47 input:event5 ->
>> ../../../class/input/event5/

I do not have this

>> -r--r--r-- 1 root root 4096 Sep  8 19:03 modalias
>> -r--r--r-- 1 root root 4096 Sep  8 19:03 name
>> -r--r--r-- 1 root root 4096 Sep  8 19:47 phys
>> drwxr-xr-x 2 root root    0 Sep  8 19:47 power/
>> lrwxrwxrwx 1 root root    0 Sep  8 19:03 subsystem ->
>> ../../../class/input/
>> -rw-r--r-- 1 root root 4096 Sep  8 19:03 uevent
>> -r--r--r-- 1 root root 4096 Sep  8 19:47 uniq
> 
>> # ls -l /sys/class/input/event5
>> total 0
>> -r--r--r-- 1 root root 4096 Sep  8 19:03 dev
>> lrwxrwxrwx 1 root root    0 Sep  8 19:03 device ->
>> ../../../class/input/input5/
>> drwxr-xr-x 2 root root    0 Sep  8 19:48 power/
>> lrwxrwxrwx 1 root root    0 Sep  8 19:03 subsystem ->
>> ../../../class/input/
>> -rw-r--r-- 1 root root 4096 Sep  8 19:03 uevent
> 
> There are a few changes.
> 
> There is no longer:
> /sys/class/input/eventX => /sys/class/input/inputX/eventX
> instead there is:
> /sys/class/inputX/input:eventX => /sys/class/input/eventX
> Notice the added "input:". I don't know if any software depends on this,
> though.
> 
> However, the change that broke id_path of udev is that
> /sys/class/input/event5/device is now a symlink to the inputX directory
> instead of being the same as the device symlink in inputX directory,
> i.e. to ../../../devices/platform/pcspkr in this case.
> 
> Udev id_path uses that directory to construct the ID_PATH variable.
> Should the sysfs structure be reverted or should udev be adapted to
> handle traversing /device symlink twice? I think the former, as there
> should be considerably more time to adapt udev for coming changes in
> sysfs.
> 

I am using 2.6.23-rc5 in current cooker and I did not notice any breakage; 
could you please show example of wrong path? E.g. I have

{pts/0}% LC_ALL=C ll /dev/input/by-path
total 0
lrwxrwxrwx 1 root root 9 Sep  2 15:00
platform-i8042-serio-0-event-kbd -> ../event0
lrwxrwxrwx 1 root root 9 Sep  2 15:00
platform-i8042-serio-1-event-mouse -> ../event1
lrwxrwxrwx 1 root root 9 Sep  2 15:00
platform-i8042-serio-1-mouse -> ../mouse0

and it looks pretty sane for me.

Oh, and I do not have CONFIG_SYSFS_DEPRECATED which probably explains why it
works for me :)

{pts/0}% LC_ALL=C ll /sys/class/input/input2/
total 0
drwxr-xr-x 2 root root    0 Sep  8 22:25 capabilities/
drwxr-xr-x 3 root root    0 Sep  8 22:22 event2/
drwxr-xr-x 2 root root    0 Sep  8 22:25 id/
-r--r--r-- 1 root root 4096 Sep  8 22:25 modalias
-r--r--r-- 1 root root 4096 Sep  8 22:25 name
-r--r--r-- 1 root root 4096 Sep  8 22:25 phys
drwxr-xr-x 2 root root    0 Sep  8 22:25 power/
lrwxrwxrwx 1 root root    0 Sep  8 22:25
subsystem -> ../../../../class/input/
-rw-r--r-- 1 root root 4096 Sep  8 22:25 uevent
-r--r--r-- 1 root root 4096 Sep  8 22:25 uniq

this implies that SYSFS_DEPRECATED may be broken w.r.t. udev; OTOH it *is*
deprecated, is not it?

-andrey


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: sysfs change of input/event devices in 2.6.23rc breaks udev
  2007-09-08 18:29 ` sysfs change of input/event devices in 2.6.23rc breaks udev Andrey Borzenkov
@ 2007-09-08 19:38   ` Anssi Hannula
  2007-09-08 19:46     ` Andrey Borzenkov
  0 siblings, 1 reply; 3+ messages in thread
From: Anssi Hannula @ 2007-09-08 19:38 UTC (permalink / raw)
  To: Andrey Borzenkov
  Cc: linux-kernel, Dmitry Torokhov, linux-input, linux-hotplug-devel

Andrey Borzenkov wrote:
> Anssi Hannula wrote:
> 
>> Hi!
>>
>> There seem to be changes in sysfs input structure between 2.6.22 and
>> 2.6.23-rc5 which cause some breakage.
>>
[...]
>> There is no longer:
>> /sys/class/input/eventX => /sys/class/input/inputX/eventX
>> instead there is:
>> /sys/class/inputX/input:eventX => /sys/class/input/eventX
>> Notice the added "input:". I don't know if any software depends on this,
>> though.
>>
>> However, the change that broke id_path of udev is that
>> /sys/class/input/event5/device is now a symlink to the inputX directory
>> instead of being the same as the device symlink in inputX directory,
>> i.e. to ../../../devices/platform/pcspkr in this case.
>>
>> Udev id_path uses that directory to construct the ID_PATH variable.
>> Should the sysfs structure be reverted or should udev be adapted to
>> handle traversing /device symlink twice? I think the former, as there
>> should be considerably more time to adapt udev for coming changes in
>> sysfs.
>>
> 
> I am using 2.6.23-rc5 in current cooker

Same kernel here, but on an older system (MDV2007.1). I tested with a 
path_id from a recent udev as well, though, but the problem was there as 
well.

> and I did not notice any breakage; 
> could you please show example of wrong path? E.g. I have
> 
> {pts/0}% LC_ALL=C ll /dev/input/by-path
> total 0
> lrwxrwxrwx 1 root root 9 Sep  2 15:00
> platform-i8042-serio-0-event-kbd -> ../event0
> lrwxrwxrwx 1 root root 9 Sep  2 15:00
> platform-i8042-serio-1-event-mouse -> ../event1
> lrwxrwxrwx 1 root root 9 Sep  2 15:00
> platform-i8042-serio-1-mouse -> ../mouse0
> 
> and it looks pretty sane for me.

I don't have anything under /dev/input/by-path as the lookup in path_id 
fails.

> Oh, and I do not have CONFIG_SYSFS_DEPRECATED which probably explains why it
> works for me :)

Probably.

> {pts/0}% LC_ALL=C ll /sys/class/input/input2/
> total 0
> drwxr-xr-x 2 root root    0 Sep  8 22:25 capabilities/
> drwxr-xr-x 3 root root    0 Sep  8 22:22 event2/
> drwxr-xr-x 2 root root    0 Sep  8 22:25 id/
> -r--r--r-- 1 root root 4096 Sep  8 22:25 modalias
> -r--r--r-- 1 root root 4096 Sep  8 22:25 name
> -r--r--r-- 1 root root 4096 Sep  8 22:25 phys
> drwxr-xr-x 2 root root    0 Sep  8 22:25 power/
> lrwxrwxrwx 1 root root    0 Sep  8 22:25
> subsystem -> ../../../../class/input/
> -rw-r--r-- 1 root root 4096 Sep  8 22:25 uevent
> -r--r--r-- 1 root root 4096 Sep  8 22:25 uniq

What does this print as devpath for you:
$ udevinfo -q all --name=input/event0

For me on 2.6.23rc5 it prints:
P: /class/input/event0
and on 2.6.22:
P: /class/input/input0/event0

Both are detected as "old sysfs layout" by path_id, but only on 2.6.22 
is there a /device symlink pointing to the expected location.

I suspect it prints something like /devices/xyz for you, right?
That seems to be detected as "new sysfs layout" by path_id and handled 
differently.

> this implies that SYSFS_DEPRECATED may be broken w.r.t. udev; OTOH it *is*
> deprecated, is not it?

Indeed, at least regarding input subsystem, for which there was a recent 
switchover [1] from class_device.

[1] 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h–57d75c5f0f7d0a9cb507521d3ad1436aea28c9

-- 
Anssi Hannula

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: sysfs change of input/event devices in 2.6.23rc breaks udev
  2007-09-08 19:38   ` Anssi Hannula
@ 2007-09-08 19:46     ` Andrey Borzenkov
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2007-09-08 19:46 UTC (permalink / raw)
  To: linux-hotplug-devel, michal.k.k.piotrowski
  Cc: Anssi Hannula, linux-input, Dmitry Torokhov, linux-kernel


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

On Saturday 08 September 2007, Anssi Hannula wrote:
> Andrey Borzenkov wrote:
> > Anssi Hannula wrote:
> >> Hi!
> >>
> >> There seem to be changes in sysfs input structure between 2.6.22 and
> >> 2.6.23-rc5 which cause some breakage.
>
> [...]
>
> >> There is no longer:
> >> /sys/class/input/eventX => /sys/class/input/inputX/eventX
> >> instead there is:
> >> /sys/class/inputX/input:eventX => /sys/class/input/eventX
> >> Notice the added "input:". I don't know if any software depends on this,
> >> though.
> >>
> >> However, the change that broke id_path of udev is that
> >> /sys/class/input/event5/device is now a symlink to the inputX directory
> >> instead of being the same as the device symlink in inputX directory,
> >> i.e. to ../../../devices/platform/pcspkr in this case.
> >>
> >> Udev id_path uses that directory to construct the ID_PATH variable.
> >> Should the sysfs structure be reverted or should udev be adapted to
> >> handle traversing /device symlink twice? I think the former, as there
> >> should be considerably more time to adapt udev for coming changes in
> >> sysfs.
> >
> > I am using 2.6.23-rc5 in current cooker
>
> Same kernel here, but on an older system (MDV2007.1). I tested with a
> path_id from a recent udev as well, though, but the problem was there as
> well.
>
> > and I did not notice any breakage;
> > could you please show example of wrong path? E.g. I have
> >
> > {pts/0}% LC_ALL=C ll /dev/input/by-path
> > total 0
> > lrwxrwxrwx 1 root root 9 Sep  2 15:00
> > platform-i8042-serio-0-event-kbd -> ../event0
> > lrwxrwxrwx 1 root root 9 Sep  2 15:00
> > platform-i8042-serio-1-event-mouse -> ../event1
> > lrwxrwxrwx 1 root root 9 Sep  2 15:00
> > platform-i8042-serio-1-mouse -> ../mouse0
> >
> > and it looks pretty sane for me.
>
> I don't have anything under /dev/input/by-path as the lookup in path_id
> fails.
>
> > Oh, and I do not have CONFIG_SYSFS_DEPRECATED which probably explains why
> > it works for me :)
>
> Probably.
>
> > {pts/0}% LC_ALL=C ll /sys/class/input/input2/
> > total 0
> > drwxr-xr-x 2 root root    0 Sep  8 22:25 capabilities/
> > drwxr-xr-x 3 root root    0 Sep  8 22:22 event2/
> > drwxr-xr-x 2 root root    0 Sep  8 22:25 id/
> > -r--r--r-- 1 root root 4096 Sep  8 22:25 modalias
> > -r--r--r-- 1 root root 4096 Sep  8 22:25 name
> > -r--r--r-- 1 root root 4096 Sep  8 22:25 phys
> > drwxr-xr-x 2 root root    0 Sep  8 22:25 power/
> > lrwxrwxrwx 1 root root    0 Sep  8 22:25
> > subsystem -> ../../../../class/input/
> > -rw-r--r-- 1 root root 4096 Sep  8 22:25 uevent
> > -r--r--r-- 1 root root 4096 Sep  8 22:25 uniq
>
> What does this print as devpath for you:
> $ udevinfo -q all --name=input/event0
>

{pts/1}% udevinfo -q all --name input/event0
P: /devices/platform/i8042/serio0/input/input0/event0
N: input/event0
S: input/by-path/platform-i8042-serio-0-event-kbd
E: ID_CLASS=kbd
E: ID_SERIAL=noserial
E: ID_PATH=platform-i8042-serio-0

> For me on 2.6.23rc5 it prints:
> P: /class/input/event0
> and on 2.6.22:
> P: /class/input/input0/event0
>
> Both are detected as "old sysfs layout" by path_id, but only on 2.6.22
> is there a /device symlink pointing to the expected location.
>
> I suspect it prints something like /devices/xyz for you, right?
> That seems to be detected as "new sysfs layout" by path_id and handled
> differently.
>
> > this implies that SYSFS_DEPRECATED may be broken w.r.t. udev; OTOH it
> > *is* deprecated, is not it?
>
> Indeed, at least regarding input subsystem, for which there was a recent
> switchover [1] from class_device.
>

If this does not work with current udev this can be considred kernel 
regression as far as I can tell.

-andrey

> [1]
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdi
>ff;h=9657d75c5f0f7d0a9cb507521d3ad1436aea28c9



[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #3: Type: text/plain, Size: 226 bytes --]

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2007-09-08 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <46E2D712.1010402@gmail.com>
2007-09-08 18:29 ` sysfs change of input/event devices in 2.6.23rc breaks udev Andrey Borzenkov
2007-09-08 19:38   ` Anssi Hannula
2007-09-08 19:46     ` Andrey Borzenkov

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).