From: Alan Stern <stern@rowland.harvard.edu>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Oliver Neukum <oneukum@suse.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] signal/usb: Replace kill_pid_info_as_cred with kill_pid_usb_asyncio
Date: Tue, 21 May 2019 11:30:16 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.44L0.1905211129020.1634-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <87zhnfooe6.fsf@xmission.com>
On Tue, 21 May 2019, Eric W. Biederman wrote:
> Alan Stern <stern@rowland.harvard.edu> writes:
> >> req = (struct usb_ctrlrequest *) buf;
> >> req->bRequestType = USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE;
> >> req->bRequest = USB_REQ_GET_DESCRIPTOR;
> >> req->wValue = htole16(USB_DT_DEVICE << 8);
> >> req->wIndex = htole16(0);
> >> req->wLength = htole16(sizeof(buf) - sizeof(*req));
> >
> > In fact, these values are supposed to be in host-endian order, not
> > necessarily little-endian. The USB core converts them if necessary.
>
> Please look again. In include/uapi/linux/ch9.h those fields are
> explicitly defined as little endian and the code in devio.c for
> USBDEVFS_URB_TYPE_CONTROL treats them as little endian. Perhaps there
> is a mismatch here but I haven't seen it and I needed this change to get
> the code to work on big endian.
Oops -- you're right. I was thinking of the USBDEVFS_CONTROL ioctl.
Sorry for the mistake.
Alan Stern
next prev parent reply other threads:[~2019-05-21 15:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 2:34 [CFT][PATCH] signal/usb: Replace kill_pid_info_as_cred with kill_pid_usb_asyncio Eric W. Biederman
2019-02-08 21:57 ` Alan Stern
2019-05-18 1:38 ` Eric W. Biederman
2019-05-18 15:20 ` Alan Stern
2019-05-18 15:25 ` Eric W. Biederman
2019-05-21 12:40 ` [PATCH] " Eric W. Biederman
2019-05-21 14:02 ` Alan Stern
2019-05-21 14:47 ` Eric W. Biederman
2019-05-21 15:30 ` Alan Stern [this message]
2019-05-22 19:02 ` Alan Stern
2019-05-22 21:50 ` Eric W. Biederman
2019-05-23 18:12 ` Alan Stern
2019-05-23 20:54 ` Eric W. Biederman
2019-06-06 14:27 ` Greg Kroah-Hartman
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=Pine.LNX.4.44L0.1905211129020.1634-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).