From: Pete Zaitcev <zaitcev@redhat.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Tomasz Moń" <desowin@gmail.com>,
linux-usb@vger.kernel.org, "Jonathan Corbet" <corbet@lwn.net>,
"Alan Stern" <stern@rowland.harvard.edu>,
zaitcev@redhat.com
Subject: Re: [PATCH] usbmon: Report device address assigned to USB device
Date: Sat, 11 Jan 2020 17:52:16 -0600 [thread overview]
Message-ID: <20200111175216.5b5680ea@suzdal.zaitcev.lan> (raw)
In-Reply-To: <20200108155513.GB2451129@kroah.com>
On Wed, 8 Jan 2020 16:55:13 +0100
Greg Kroah-Hartman <gregkh@linuxfoundation.org> 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.
-- Pete
next prev parent reply other threads:[~2020-01-11 23:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 9:37 [PATCH] usbmon: Report device address assigned to USB device Tomasz Moń
2020-01-06 23:09 ` Pete Zaitcev
2020-01-08 15:55 ` Greg Kroah-Hartman
2020-01-11 23:52 ` Pete Zaitcev [this message]
2020-01-13 15:05 ` Alan Stern
2020-01-14 21:06 ` Pete Zaitcev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200111175216.5b5680ea@suzdal.zaitcev.lan \
--to=zaitcev@redhat.com \
--cc=corbet@lwn.net \
--cc=desowin@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox