Re: [PATCH] usbmon: Report device address assigned to USB device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 11 Jan 2020, Pete Zaitcev wrote:

> On Wed, 8 Jan 2020 16:55:13 +0100
> Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > On Mon, Jan 06, 2020 at 10:37:17AM +0100, Tomasz Moń wrote:
> > > Make USB device addresses match while sniffing USB communication
> > > with usbmon and hardware USB sniffer (OpenVizsla) at the same time.
> > > On xHCI root hubs the address is assigned by hardware and can be
> > > different than devnum.
> > 
> > This breaks the userspace abi for matching up the devnum with the number
> > that is listed by the kernel to userspace, making it really hard to
> > match things up for xhci devices now :(
> > 
> > I understand the need to look at this data, but you can't do it in a way
> > that will change things like this.
> 
> This sounds reasonable, although perhaps unfortunate. I acked Tomasz's
> patch because I thought that XHCI is new, and thus it's no big deal
> if its results are different.
> 
> Of course I rushed to examine the packet structure, but yes, there's
> no space in the header, not without some trickery. For example, the
> upper 8 bits of the ID are probably the same for all packets, so
> it may be stuffed in there. Or, it might be possible to create an
> extra header and attach it at the end of ISO descriptors.
> 
> Alan's suggestion of leaving the physical address in /sys appeals
> the most to me, honestly. One thing though, libpcap will need to
> rifle through /sys and then store that address, so its serialization
> has to be changed no matter what. Unfortunately, I'm wholly ignorant
> as to what syntax it uses and how extensible it is.

Alternatively, libpcap can ignore the issue and just display the device
numbers, as it does now.  A separate program or the user could convert
the number to a physical address, if necessary, using the information 
in sysfs.

Alan Stern




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux