unneeded special-casing of USB serial adapters

Bug #264792 reported by Tormod Volden
2
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: udev

/etc/udev/rules.d/40-permissions.rules includes a section for "USB serial converters" but will only match the product 0403:6001. I have for instance a 067b:2303 PL2303 device, and there are many others. I know that the 0403:6001 has had many issues (like bug #84139) but it's not clear for me if there's any reason this one needs special treatment. I would expect there to be either a list of several product ID's or no section at all.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

If there are others we have missed, please give the USB ids.

This is not intended to be a "special treatment" list, the argument is simply that since we give serial devices the dialout group, we should give USB serial converter devices the same group (and raw access to it, to program them); and that was the first id we had to hand.

Changed in udev:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Tormod Volden (tormodvolden) wrote :

We can mine out a whole bunch from http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=tree;f=drivers/usb/serial;hb=HEAD

But I think there might be like hundreds of them, so maybe we don't want to bomb 40-permissions.rules with it? Should we make a separate file or script to detect them? I don't think there is any USB interface descriptor magic to identify them.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Do you think there might be an interesting way to identify them automatically, for example by checking for a USB device with serial port devices on it?

I don't have any to hand, could you output the sysfs information for the device (ie. the tree, and udevinfo on each node)

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I don't have any at hand ATM either (maybe in a few days). But can't we simply match on kernel name "KERNEL==ttyUSB*" ? That's what I have been using myself, so pardon me for not bringing up that earlier. I got so focused on that single rule that was in there.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

One would assume that the tty subsystem rules would be already getting caught by:

SUBSYSTEM=="tty", GROUP="dialout"

but they're not, so they must be coming from a different subsystem.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I should really get one at hand and try it on an unmodified Intrepid installation, because I had been working on an old, modified system. Actually I believe they come from "tty" as well, so there shouldn't be any problem at all. I don't think the bug summary is valid, but the description is: We can probably remove the usb-serial part from /etc/udev/rules.d/40-permissions.rules and rely on the tty match. Unless that 0403:6001 needs special treatment :)

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Ok, all is well out-of-the-box in intrepid with the 0557:2008:
$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 2008-09-25 11:33 /dev/ttyUSB0

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.7 KiB)

This bug was fixed in the package udev - 136-1

---------------
udev (136-1) jaunty; urgency=low

  One of the biggest changes in this release is that the default rules
  are no longer conffiles and are now installed into /lib/udev/rules.d

  You may still add your custom rules to /etc/udev/rules.d and these
  will be processed after the default ones, and can thus override
  anything they do.

  To avoid side-effects of default rules (ie. running of programs),
  create the file with the same name.

  * New upstream release:
    - Changed to use autoconf
    - Default rules moved to /lib/udev/rules.d
    - udevadm symlinks removed.
    - udevadm info output for --device-id-of-file changed.
    - udevadm trigger has new --type option.
    - libvolume_id soname change.
    - libvolume_id now able to return multiple matches for a single block
      device, or no matches if conflicting metadata found.
    - libudev shared library introduced.
    - by-id/scsi-* and by-id/ieee-* links both created by Firewire disks.
    - Optical devices no longer probed for raid signatures. (LP: #283316).
    - DEVTYPE=disk/partition no longer exported by default.
    - pnp support removed now that we have MODALIAS support in kernel.
    - Introduced /dev/block and /dev/char (see changelog for 124-6).
    - Rule matching engine changed, limits such as 5 ENV and ATTR matches
      and only one match for any other key are now gone. NAME assignment
      is no longer special cased (subsequent assignments will now overwrite
      unless := is used).
    - Substantial memory footprint reduction work.

  * debian/patches/01-cdrom-vol_id-probing.patch:
    - Dropped, included in upstream release.
  * debian/patches/80-extras-dvb_device_name.patch:
    - Dropped, no longer compiles and won't be needed from the next kernel
      onwards. Since these aren't boot critical, just do it in shell.
  * debian/patches/80-extras-firmware.patch:
    - Dropped, no longer compiles anyway so we may as well just use the
      upstream firmware.sh which also supports crazy PackageKit stuff
  * debian/patches/80-extras-ide_media.patch:
    - Dropped, the ide subsystem has had MODALIAS support since hardy using
      the media type.
  * debian/patches/80-extras-usb_device_name.patch:
    - Dropped, we no longer need to support the legacy usb_device subsystem
      since we've had the newer ENVTYPE=usb_device objects since hardy.
    - Bump minimum kernel version to 2.6.24 for the initramfs.
  * debian/patches/80-extras-vio_type.patch:
    - Dropped, we don't even build these modules.
  * debian/patches/80-extras-watershed.patch:
    - Dropped, we do not used it in any udev rules shipped in this package;
      it can be separated out into another source package if other things
      still use it (which we should try to make them not).

  * Merged our rules with Upstream default rules, this results in a number
    of minor changes but achieves consistency with other distributions:
    * /dev/net/tun is now mode 666, the kernel documentation says this is safe
      since you still need CAP_NET_ADMIN to create tunnels.
    * /dev/srN are now the definitive names of SCSI CD-ROM devices, with
...

Read more...

Changed in udev:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.