upstart-udev-bridge should convert udev data to utf8

Reported by James Hunt on 2012-01-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
Low
Unassigned

Bug Description

Working on bug 829980 suggested that all non-ascii data the kernel passes back to userland is "bogus". However, the following udev log suggests otherwise:

https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/829980/+attachment/2644589/+files/udev

$ egrep "[^[:print:]]" /tmp/udev
HID_NAME=䙸〄䜀 换敤ヲ楨歪浬潮煰獲睶翿膀
                                                                                     HID_UNIQ=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲
NAME="䙸〄䜀 换敤ヲ楨歪浬潮煰獲睶翿膀
UNIQ="香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲"
HID_NAME=䙸〄䜀 换敤ヲ楨歪浬潮煰獲睶翿膀
                                                                                     HID_UNIQ=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲
NAME="䙸〄䜀 换敤ヲ楨歪浬潮煰獲睶翿膀
UNIQ="香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲"
ID_SERIAL=䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
ID_SERIAL_SHORT=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
HID_NAME=䙸〄䜀 换敤ヲ楨歪浬潮煰獲睶翿膀
                                                                                     HID_UNIQ=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲
HID_NAME=䙸〄䜀 换敤ヲ楨歪浬潮煰獲睶翿膀
                                                                                     HID_UNIQ=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲
NAME="䙸〄䜀 换敤ヲ楨歪浬潮煰獲睶翿膀
UNIQ="香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲"
ID_SERIAL=䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
ID_SERIAL_SHORT=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
ID_SERIAL=䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
ID_SERIAL_SHORT=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
DEVLINKS=/dev/input/by-id/usb-䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰-event-mouse /dev/input/by-id/usb- 〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰-if01-event-mouse /dev/input/by-path/pci-0000:00:1d.2-usb-0:2:1.1-event-mouse
ID_SERIAL=䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
ID_SERIAL_SHORT=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
DEVLINKS=/dev/input/by-id/usb-䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰-mouse /dev/input/by-id/usb-䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰-if01-mouse /dev/input/by-path/pci-0000:00:1d.2-usb-0:2:1.1-mouse
NAME="䙸〄䜀 换敤ヲ楨歪浬潮煰獲睶翿膀
UNIQ="香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲"
ID_SERIAL=䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
ID_SERIAL_SHORT=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
ID_SERIAL=䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
ID_SERIAL_SHORT=香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰
DEVLINKS=/dev/input/by-id/usb-䙸〄䜀_换敤ヲ楨歪浬潮煰獲___睶_________翿膀________________香晦晦香香晦晦香香晦晦香香晦晦香香晦晦敖⁲⸱‱㍂‴㐲⼳〲㠰-event-kbd /dev/input/by-path/pci-0000:00:1d.2-usb-0:2:1.0-event-kbd
$

So, it appears that as udev places no constraints on the character set, we're now seeing utf8 data. Strictly, the upstart-udev-bridge needs now to be modified to fully support utf8 strings. However, this work would need to be coordinated with the udev upstream (since it is possible for udev rules to inject data and that data could be utf8).

The implication of the utf8 data is that it is not possible to write an Upstart start/stop on condition to match on any fields containing utf8 chracters since the upstart-udev-bridge is now stripping them out (see bug 829980).

James Hunt (jamesodhunt) on 2012-01-05
Changed in upstart:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers