2012-05-24 15:55:22

by Jeff Chua

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Thu, Apr 26, 2012 at 11:12 PM, Greg Kroah-Hartman
<[email protected]> wrote:
> On Thu, Apr 26, 2012 at 11:06:45AM -0400, Alan Stern wrote:
>> On Wed, 25 Apr 2012, Greg Kroah-Hartman wrote:
>>
>> > This option has been deprecated for many years now, and no userspace
>> > tools use it anymore, so it should be safe to finally remove it.
>> >
>> > Reported-by: Kay Sievers <[email protected]>
>> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
>> >
>> > Anyone object to me queuing this up for the 3.5 kernel release?
>>
>> I'm not sure about this. ?There are a few systems still floating around
>> that don't use udev; on those systems /proc/bus/usb is the only way for
>> user programs to control USB devices. ?Admittedly, I have no idea
>> whether any such systems will be using 3.5 or later kernels...
>
> They don't have to use udev, they can use devtmpfs (which is what the
> majority of embedded systems use today), or they can just use static
> device nodes to get access to these devices, the char node is still
> present, we aren't getting rid of them at all.

Looks like vmware is breaking. Can't find any usb devices. I'm not using udev.

Jeff


2012-05-24 15:59:36

by Alan

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Thu, 24 May 2012 23:55:16 +0800
Jeff Chua <[email protected]> wrote:

> On Thu, Apr 26, 2012 at 11:12 PM, Greg Kroah-Hartman
> <[email protected]> wrote:
> > On Thu, Apr 26, 2012 at 11:06:45AM -0400, Alan Stern wrote:
> >> On Wed, 25 Apr 2012, Greg Kroah-Hartman wrote:
> >>
> >> > This option has been deprecated for many years now, and no userspace
> >> > tools use it anymore, so it should be safe to finally remove it.
> >> >
> >> > Reported-by: Kay Sievers <[email protected]>
> >> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> >> >
> >> > Anyone object to me queuing this up for the 3.5 kernel release?
> >>
> >> I'm not sure about this. ?There are a few systems still floating around
> >> that don't use udev; on those systems /proc/bus/usb is the only way for
> >> user programs to control USB devices. ?Admittedly, I have no idea
> >> whether any such systems will be using 3.5 or later kernels...
> >
> > They don't have to use udev, they can use devtmpfs (which is what the
> > majority of embedded systems use today), or they can just use static
> > device nodes to get access to these devices, the char node is still
> > present, we aren't getting rid of them at all.
>
> Looks like vmware is breaking. Can't find any usb devices. I'm not using udev.

Perhaps a WARN_ON_ONCE would be safer for a bit ?

2012-05-24 21:52:59

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Thu, May 24, 2012 at 11:55:16PM +0800, Jeff Chua wrote:
> On Thu, Apr 26, 2012 at 11:12 PM, Greg Kroah-Hartman
> <[email protected]> wrote:
> > On Thu, Apr 26, 2012 at 11:06:45AM -0400, Alan Stern wrote:
> >> On Wed, 25 Apr 2012, Greg Kroah-Hartman wrote:
> >>
> >> > This option has been deprecated for many years now, and no userspace
> >> > tools use it anymore, so it should be safe to finally remove it.
> >> >
> >> > Reported-by: Kay Sievers <[email protected]>
> >> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> >> >
> >> > Anyone object to me queuing this up for the 3.5 kernel release?
> >>
> >> I'm not sure about this. ?There are a few systems still floating around
> >> that don't use udev; on those systems /proc/bus/usb is the only way for
> >> user programs to control USB devices. ?Admittedly, I have no idea
> >> whether any such systems will be using 3.5 or later kernels...
> >
> > They don't have to use udev, they can use devtmpfs (which is what the
> > majority of embedded systems use today), or they can just use static
> > device nodes to get access to these devices, the char node is still
> > present, we aren't getting rid of them at all.
>
> Looks like vmware is breaking. Can't find any usb devices. I'm not using udev.

vmware doesn't use usbfs, otherwise how would it be working on all of
the systems out there that haven't mounted usbfs for years?

What exactly broke? What version of vmware are you using, and is the
problem in the guest or host?

We delayed other usbfs changes for years due to vmware "issues", it
wouldn't be the first time we've had to handle this :(

thanks,

greg k-h

2012-05-25 05:48:09

by Jeff Chua

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Fri, May 25, 2012 at 5:52 AM, Greg Kroah-Hartman
<[email protected]> wrote:
> On Thu, May 24, 2012 at 11:55:16PM +0800, Jeff Chua wrote:
>> On Thu, Apr 26, 2012 at 11:12 PM, Greg Kroah-Hartman
>> <[email protected]> wrote:
>> > On Thu, Apr 26, 2012 at 11:06:45AM -0400, Alan Stern wrote:
>> >> On Wed, 25 Apr 2012, Greg Kroah-Hartman wrote:
>> >>
>> >> > This option has been deprecated for many years now, and no userspace
>> >> > tools use it anymore, so it should be safe to finally remove it.
>> >> >
>> >> > Reported-by: Kay Sievers <[email protected]>
>> >> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
>> >> >
>> >> > Anyone object to me queuing this up for the 3.5 kernel release?
>> >>
>> >> I'm not sure about this. ?There are a few systems still floating around
>> >> that don't use udev; on those systems /proc/bus/usb is the only way for
>> >> user programs to control USB devices. ?Admittedly, I have no idea
>> >> whether any such systems will be using 3.5 or later kernels...
>> >
>> > They don't have to use udev, they can use devtmpfs (which is what the
>> > majority of embedded systems use today), or they can just use static
>> > device nodes to get access to these devices, the char node is still
>> > present, we aren't getting rid of them at all.
>>
>> Looks like vmware is breaking. Can't find any usb devices. I'm not using udev.
>
> vmware doesn't use usbfs, otherwise how would it be working on all of
> the systems out there that haven't mounted usbfs for years?
>
> What exactly broke? ?What version of vmware are you using, and is the
> problem in the guest or host?
>
> We delayed other usbfs changes for years due to vmware "issues", it
> wouldn't be the first time we've had to handle this :(


VMWare workstation 8.0.3

# vmware-usbarbitrator -f --info
DICT product.buildNumber = 703057
DICT product.version = 8.0.3
DICT workstation.product.version = 8.0.3
DICT product.name = VMware Workstation
VMware USB Arbitration Service Version 8.4.19
USB: Unable to open "/proc/bus/usb/devices" (No such file or directory).
No USB enumerator!

If I revert back to git pull 3 years earlier, it works.

Thanks,
Jeff

2012-05-25 06:01:34

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Fri, May 25, 2012 at 01:48:06PM +0800, Jeff Chua wrote:
> On Fri, May 25, 2012 at 5:52 AM, Greg Kroah-Hartman
> <[email protected]> wrote:
> > On Thu, May 24, 2012 at 11:55:16PM +0800, Jeff Chua wrote:
> >> On Thu, Apr 26, 2012 at 11:12 PM, Greg Kroah-Hartman
> >> <[email protected]> wrote:
> >> > On Thu, Apr 26, 2012 at 11:06:45AM -0400, Alan Stern wrote:
> >> >> On Wed, 25 Apr 2012, Greg Kroah-Hartman wrote:
> >> >>
> >> >> > This option has been deprecated for many years now, and no userspace
> >> >> > tools use it anymore, so it should be safe to finally remove it.
> >> >> >
> >> >> > Reported-by: Kay Sievers <[email protected]>
> >> >> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> >> >> >
> >> >> > Anyone object to me queuing this up for the 3.5 kernel release?
> >> >>
> >> >> I'm not sure about this. ?There are a few systems still floating around
> >> >> that don't use udev; on those systems /proc/bus/usb is the only way for
> >> >> user programs to control USB devices. ?Admittedly, I have no idea
> >> >> whether any such systems will be using 3.5 or later kernels...
> >> >
> >> > They don't have to use udev, they can use devtmpfs (which is what the
> >> > majority of embedded systems use today), or they can just use static
> >> > device nodes to get access to these devices, the char node is still
> >> > present, we aren't getting rid of them at all.
> >>
> >> Looks like vmware is breaking. Can't find any usb devices. I'm not using udev.
> >
> > vmware doesn't use usbfs, otherwise how would it be working on all of
> > the systems out there that haven't mounted usbfs for years?
> >
> > What exactly broke? ?What version of vmware are you using, and is the
> > problem in the guest or host?
> >
> > We delayed other usbfs changes for years due to vmware "issues", it
> > wouldn't be the first time we've had to handle this :(
>
>
> VMWare workstation 8.0.3
>
> # vmware-usbarbitrator -f --info
> DICT product.buildNumber = 703057
> DICT product.version = 8.0.3
> DICT workstation.product.version = 8.0.3
> DICT product.name = VMware Workstation
> VMware USB Arbitration Service Version 8.4.19
> USB: Unable to open "/proc/bus/usb/devices" (No such file or directory).
> No USB enumerator!

Ok, I have no idea what any of this means.

What host os are you using that does not have udev in it?

What client os are you using that wants access to the USB ports that is
not working? Is this the latest version of vmware (hint, I have no idea
what their version numbering is, you are going to have to look that up,
but I know they have fixed stuff like this in their newer releases.)

What release of the host os are you running?

If you aren't using udev, what are you using for your static device
nodes?

If you are using static device nodes, why don't you have the /dev/usb/
nodes on your system (i.e. why didn't your distro create them for you?)

> If I revert back to git pull 3 years earlier, it works.

A git pull of a 3 year old kernel? What are you talking about here?

totally confused,

greg k-h

2012-05-25 07:06:36

by Jeff Chua

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Fri, May 25, 2012 at 2:01 PM, Greg Kroah-Hartman
<[email protected]> wrote:
> On Fri, May 25, 2012 at 01:48:06PM +0800, Jeff Chua wrote:
>> On Fri, May 25, 2012 at 5:52 AM, Greg Kroah-Hartman
>> <[email protected]> wrote:
>> > On Thu, May 24, 2012 at 11:55:16PM +0800, Jeff Chua wrote:
>> >> On Thu, Apr 26, 2012 at 11:12 PM, Greg Kroah-Hartman
>> >> <[email protected]> wrote:
>> >> > On Thu, Apr 26, 2012 at 11:06:45AM -0400, Alan Stern wrote:
>> >> >> On Wed, 25 Apr 2012, Greg Kroah-Hartman wrote:
>> >> >>
>> >> >> > This option has been deprecated for many years now, and no userspace
>> >> >> > tools use it anymore, so it should be safe to finally remove it.
>> >> >> >
>> >> >> > Reported-by: Kay Sievers <[email protected]>
>> >> >> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
>> >> >> >
>> >> >> > Anyone object to me queuing this up for the 3.5 kernel release?
>> >> >>
>> >> >> I'm not sure about this. ?There are a few systems still floating around
>> >> >> that don't use udev; on those systems /proc/bus/usb is the only way for
>> >> >> user programs to control USB devices. ?Admittedly, I have no idea
>> >> >> whether any such systems will be using 3.5 or later kernels...
>> >> >
>> >> > They don't have to use udev, they can use devtmpfs (which is what the
>> >> > majority of embedded systems use today), or they can just use static
>> >> > device nodes to get access to these devices, the char node is still
>> >> > present, we aren't getting rid of them at all.
>> >>
>> >> Looks like vmware is breaking. Can't find any usb devices. I'm not using udev.
>> >
>> > vmware doesn't use usbfs, otherwise how would it be working on all of
>> > the systems out there that haven't mounted usbfs for years?
>> >
>> > What exactly broke? ?What version of vmware are you using, and is the
>> > problem in the guest or host?
>> >
>> > We delayed other usbfs changes for years due to vmware "issues", it
>> > wouldn't be the first time we've had to handle this :(
>>
>>
>> VMWare workstation 8.0.3
>>
>> # vmware-usbarbitrator -f --info
>> DICT ? ? ? product.buildNumber = 703057
>> DICT ? ? ? ? ? product.version = 8.0.3
>> DICT workstation.product.version = 8.0.3
>> DICT ? ? ? ? ? ? ?product.name = VMware Workstation
>> VMware USB Arbitration Service Version 8.4.19
>> USB: Unable to open "/proc/bus/usb/devices" (No such file or directory).
>> No USB enumerator!
> Ok, I have no idea what any of this means.

I think the process "vmware-usbarbitrator" is trying to read
proc/bus/usb/devices and can't find the file, so when I go to vmware,
it can't find any usb devices.


> What host os are you using that does not have udev in it?

No udev. My own vanilla kernel.


> What client os are you using that wants access to the USB ports that is
> not working? ?Is this the latest version of vmware (hint, I have no idea
> what their version numbering is, you are going to have to look that up,
> but I know they have fixed stuff like this in their newer releases.)

It's the latest vmware workstation 8.0.3. The vmware "Removable
Devices" tab is not showing any USB devices.

> What release of the host os are you running?

Linux-3.4.0 with commit 07acfc2a9349a8ce45b236c2624dad452001966b.

> If you aren't using udev, what are you using for your static device nodes?

Usually, with /proc/bus/usb/devices present, vmware will just read
from this file and I get to see the usb devices in vmware.

> If you are using static device nodes, why don't you have the /dev/usb/
> nodes on your system (i.e. why didn't your distro create them for you?)

Didn't check that as it was working just few days earlier:)

>> If I revert back to git pull 3 years earlier, it works.
> A git pull of a 3 year old kernel? ?What are you talking about here?

It should have been 3 days ago. Sorry! 3 linux days seems like 3 years
in the human time:)


Thanks,
Jeff

2012-05-25 07:16:54

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Fri, May 25, 2012 at 03:06:33PM +0800, Jeff Chua wrote:
> On Fri, May 25, 2012 at 2:01 PM, Greg Kroah-Hartman
> <[email protected]> wrote:
> > On Fri, May 25, 2012 at 01:48:06PM +0800, Jeff Chua wrote:
> >> On Fri, May 25, 2012 at 5:52 AM, Greg Kroah-Hartman
> >> <[email protected]> wrote:
> >> > On Thu, May 24, 2012 at 11:55:16PM +0800, Jeff Chua wrote:
> >> >> On Thu, Apr 26, 2012 at 11:12 PM, Greg Kroah-Hartman
> >> >> <[email protected]> wrote:
> >> >> > On Thu, Apr 26, 2012 at 11:06:45AM -0400, Alan Stern wrote:
> >> >> >> On Wed, 25 Apr 2012, Greg Kroah-Hartman wrote:
> >> >> >>
> >> >> >> > This option has been deprecated for many years now, and no userspace
> >> >> >> > tools use it anymore, so it should be safe to finally remove it.
> >> >> >> >
> >> >> >> > Reported-by: Kay Sievers <[email protected]>
> >> >> >> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> >> >> >> >
> >> >> >> > Anyone object to me queuing this up for the 3.5 kernel release?
> >> >> >>
> >> >> >> I'm not sure about this. ?There are a few systems still floating around
> >> >> >> that don't use udev; on those systems /proc/bus/usb is the only way for
> >> >> >> user programs to control USB devices. ?Admittedly, I have no idea
> >> >> >> whether any such systems will be using 3.5 or later kernels...
> >> >> >
> >> >> > They don't have to use udev, they can use devtmpfs (which is what the
> >> >> > majority of embedded systems use today), or they can just use static
> >> >> > device nodes to get access to these devices, the char node is still
> >> >> > present, we aren't getting rid of them at all.
> >> >>
> >> >> Looks like vmware is breaking. Can't find any usb devices. I'm not using udev.
> >> >
> >> > vmware doesn't use usbfs, otherwise how would it be working on all of
> >> > the systems out there that haven't mounted usbfs for years?
> >> >
> >> > What exactly broke? ?What version of vmware are you using, and is the
> >> > problem in the guest or host?
> >> >
> >> > We delayed other usbfs changes for years due to vmware "issues", it
> >> > wouldn't be the first time we've had to handle this :(
> >>
> >>
> >> VMWare workstation 8.0.3
> >>
> >> # vmware-usbarbitrator -f --info
> >> DICT ? ? ? product.buildNumber = 703057
> >> DICT ? ? ? ? ? product.version = 8.0.3
> >> DICT workstation.product.version = 8.0.3
> >> DICT ? ? ? ? ? ? ?product.name = VMware Workstation
> >> VMware USB Arbitration Service Version 8.4.19
> >> USB: Unable to open "/proc/bus/usb/devices" (No such file or directory).
> >> No USB enumerator!
> > Ok, I have no idea what any of this means.
>
> I think the process "vmware-usbarbitrator" is trying to read
> proc/bus/usb/devices and can't find the file, so when I go to vmware,
> it can't find any usb devices.

You are running this program where, in the host or guest?

> > What host os are you using that does not have udev in it?
>
> No udev. My own vanilla kernel.

What distro. Why no udev? What is managing your /dev/ tree? A distro
package? A tarball? Something else?

> > What client os are you using that wants access to the USB ports that is
> > not working? ?Is this the latest version of vmware (hint, I have no idea
> > what their version numbering is, you are going to have to look that up,
> > but I know they have fixed stuff like this in their newer releases.)
>
> It's the latest vmware workstation 8.0.3. The vmware "Removable
> Devices" tab is not showing any USB devices.

For the host or guest?

> > What release of the host os are you running?
>
> Linux-3.4.0 with commit 07acfc2a9349a8ce45b236c2624dad452001966b.

No, sorry, what distro?

> > If you aren't using udev, what are you using for your static device nodes?
>
> Usually, with /proc/bus/usb/devices present, vmware will just read
> from this file and I get to see the usb devices in vmware.

That's nice, but it's been depreciated for many years now. vmware
supports this to run on older systems that never changed. The usbfs
code turned out to be wrong as it couldn't handle user permissions
properly, which is why it has been removed.

Use /dev/usb/ device nodes intead. If you have a distro that has static
device nodes, just add them to the package that has those nodes, and you
should be fine. That will bring you into the mid 2000's as far as
device nodes go, I'm amazed that this hasn't been noticed before now.

thanks,

greg k-h

2012-05-25 09:01:32

by Kay Sievers

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Fri, May 25, 2012 at 9:16 AM, Greg Kroah-Hartman
<[email protected]> wrote:
> On Fri, May 25, 2012 at 03:06:33PM +0800, Jeff Chua wrote:

>> >> VMware USB Arbitration Service Version 8.4.19
>> >> USB: Unable to open "/proc/bus/usb/devices" (No such file or directory).

I think vmware tries to open the usual /dev/bus/usb/ nodes directly
after it has tried the deprecated /proc nodes.

Udev would create the /dev/bus/ nodes.

Or the kernel would create them itself if:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
is used.

> Use /dev/usb/ device nodes instead.  If you have a distro that has static
> device nodes, just add them to the package that has those nodes, and you
> should be fine.  That will bring you into the mid 2000's as far as
> device nodes go, I'm amazed that this hasn't been noticed before now.

Many distros have disabled the USB_DEVICEFS option and there are
usually no reports about problems any more.

But I guess the number of systems that want to run USB devices, and
pass them along to virtualization, but have an unmanaged static /dev
are close to one user these days. :)

Kay

2012-05-25 11:35:19

by Kay Sievers

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Fri, May 25, 2012 at 11:01 AM, Kay Sievers <[email protected]> wrote:
> On Fri, May 25, 2012 at 9:16 AM, Greg Kroah-Hartman
> <[email protected]> wrote:
>> On Fri, May 25, 2012 at 03:06:33PM +0800, Jeff Chua wrote:
>
>>> >> VMware USB Arbitration Service Version 8.4.19
>>> >> USB: Unable to open "/proc/bus/usb/devices" (No such file or directory).
>
> I think vmware tries to open the usual /dev/bus/usb/ nodes directly
> after it has tried the deprecated /proc nodes.
>
> Udev would create the /dev/bus/ nodes.
>
> Or the kernel would create them itself if:
>  CONFIG_DEVTMPFS=y
>  CONFIG_DEVTMPFS_MOUNT=y
> is used.

Jeff,

if you still need to keep your static /dev setup, can you please try:
$ mkdir /dev/bus
$ mount -t devtmpfs none /dev/bus
$ mount --bind /dev/bus/bus /dev/bus

This should replace the yucky usbfs nodes at /proc/bus/ with the usual
/dev/bus/ kernel-managed device nodes. It tricks the usually used /dev
devtmpfs, into just providing /dev/bus/ on top of your static /dev.

VMWare should pick up this directory, just like it works for all usual
distro-like setups, and find the dynamically managed USB devices.

Kay

2012-05-25 13:31:49

by Jeff Chua

[permalink] [raw]
Subject: Re: [RFC PATCH] USB: remove CONFIG_USB_DEVICEFS

On Fri, May 25, 2012 at 5:01 PM, Kay Sievers <[email protected]> wrote:
> On Fri, May 25, 2012 at 9:16 AM, Greg Kroah-Hartman
> <[email protected]> wrote:
>> On Fri, May 25, 2012 at 03:06:33PM +0800, Jeff Chua wrote:
>
>>> >> VMware USB Arbitration Service Version 8.4.19
>>> >> USB: Unable to open "/proc/bus/usb/devices" (No such file or directory).
>
> I think vmware tries to open the usual /dev/bus/usb/ nodes directly
> after it has tried the deprecated /proc nodes.
>
> Udev would create the /dev/bus/ nodes.
>
> Or the kernel would create them itself if:
> ?CONFIG_DEVTMPFS=y
> ?CONFIG_DEVTMPFS_MOUNT=y
> is used.
>
>> Use /dev/usb/ device nodes instead. ?If you have a distro that has static
>> device nodes, just add them to the package that has those nodes, and you
>> should be fine. ?That will bring you into the mid 2000's as far as
>> device nodes go, I'm amazed that this hasn't been noticed before now.
>
> Many distros have disabled the USB_DEVICEFS option and there are
> usually no reports about problems any more.
>
> But I guess the number of systems that want to run USB devices, and
> pass them along to virtualization, but have an unmanaged static /dev
> are close to one user these days. :)

Yep, it's just me (the one), I guess. Configured kernel as suggested,
and it's all working now.

Sorry, as for the distro, it's just bare minimum...but works wonderfully well.

Thanks again for all your help!

Jeff