Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1093240ybm; Tue, 21 May 2019 08:32:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqySQ7M8Ryp992tYXLNaJbWfC09u0D19vpKG/v6elLl3b6ZzipD/+QnHpPO5PABoCScAMOwT X-Received: by 2002:a17:902:54f:: with SMTP id 73mr83575172plf.140.1558452722531; Tue, 21 May 2019 08:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558452722; cv=none; d=google.com; s=arc-20160816; b=Pa0Lk1CbVB5gFii/P4VAkxjiGZt9XcAhtk1T2dmREyMP1MfW7UjyoMuRRqxS2p/zwT WzzS0osrU85YI/ydpsCb3xfGUrT5PW1+tfKb91bEstFlCKj8HYkPR71Sv889dQhyLkUE FRkWdCYgbNNTiXoISS4Z7fCzOZNDqznc6SU4H0k1qFYMaqLm+fY2q3kan8T7DaLhrUU6 PzQFBZVnr0Cr4yKSXHmMnlepP8h1m+69ztqvn/P+yzoUi4egbNT0OgTa9Vypmmacae0k Bj1AIqzwlzQ88Pa4jnXuxbALG7ZQoGmRrcyrz91OQLaL9vu1QdboaMqKAbOEsFwgBdvi C7OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=TQwxH89JnP0GidFN5r3k9Xa24Bo+j7hk7qcMlxWJrrg=; b=yMLTL5/hE5PUcLDpvDFoHYoRBtzcCJT/Uhn7xYl5AWY5IBsMR2ohtM5dRjiOcegUwD kWrwi70GWylY28mZiI3n4xY973eSUl3bZ9zSv+dOQDhh/nXzylqfo21gXYMBymQ9JnbR qF2AbeePoW++MIs+uIMzqWSnbLucMzeFQDJWCZhTfLYjlxJOdw8pqAKcFs4XFilbUXoK VY9iygdk9JI4eww78mjnO0m1e6p7jGBkAVNLUmhUwazjXzSPrld532owpbUkJ852D7X6 DAp9/YTprGdvo9l2zeDbSqDfA45yy1Os9xOpzOvRT7H2Pcbc7WnxvU8T1iBm45is4+OE rHSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a71si20497340pge.211.2019.05.21.08.31.45; Tue, 21 May 2019 08:32:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728317AbfEUPaR (ORCPT + 99 others); Tue, 21 May 2019 11:30:17 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:33556 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1728045AbfEUPaR (ORCPT ); Tue, 21 May 2019 11:30:17 -0400 Received: (qmail 5537 invoked by uid 2102); 21 May 2019 11:30:16 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 21 May 2019 11:30:16 -0400 Date: Tue, 21 May 2019 11:30:16 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Eric W. Biederman" cc: linux-usb@vger.kernel.org, Greg Kroah-Hartman , Oliver Neukum , Subject: Re: [PATCH] signal/usb: Replace kill_pid_info_as_cred with kill_pid_usb_asyncio In-Reply-To: <87zhnfooe6.fsf@xmission.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 May 2019, Eric W. Biederman wrote: > Alan Stern 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