<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core/devio.c, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/core/devio.c?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/core/devio.c?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-09-26T00:30:39Z</updated>
<entry>
<title>usb/core/devio.c: Don't reject control message to endpoint with wrong direction bit</title>
<updated>2013-09-26T00:30:39Z</updated>
<author>
<name>Kurt Garloff</name>
<email>kurt@garloff.de</email>
</author>
<published>2013-09-24T12:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=831abf76643555a99b80a3b54adfa7e4fa0a3259'/>
<id>urn:sha1:831abf76643555a99b80a3b54adfa7e4fa0a3259</id>
<content type='text'>
Trying to read data from the Pegasus Technologies NoteTaker (0e20:0101)
[1] with the Windows App (EasyNote) works natively but fails when
Windows is running under KVM (and the USB device handed to KVM).

The reason is a USB control message
 usb 4-2.2: control urb: bRequestType=22 bRequest=09 wValue=0200 wIndex=0001 wLength=0008
This goes to endpoint address 0x01 (wIndex); however, endpoint address
0x01 does not exist. There is an endpoint 0x81 though (same number,
but other direction); the app may have meant that endpoint instead.

The kernel thus rejects the IO and thus we see the failure.

Apparently, Linux is more strict here than Windows ... we can't change
the Win app easily, so that's a problem.

It seems that the Win app/driver is buggy here and the driver does not
behave fully according to the USB HID class spec that it claims to
belong to.  The device seems to happily deal with that though (and
seems to not really care about this value much).

So the question is whether the Linux kernel should filter here.
Rejecting has the risk that somewhat non-compliant userspace apps/
drivers (most likely in a virtual machine) are prevented from working.
Not rejecting has the risk of confusing an overly sensitive device with
such a transfer. Given the fact that Windows does not filter it makes
this risk rather small though.

The patch makes the kernel more tolerant: If the endpoint address in
wIndex does not exist, but an endpoint with toggled direction bit does,
it will let the transfer through. (It does NOT change the message.)

With attached patch, the app in Windows in KVM works.
 usb 4-2.2: check_ctrlrecip: process 13073 (qemu-kvm) requesting ep 01 but needs 81

I suspect this will mostly affect apps in virtual environments; as on
Linux the apps would have been adapted to the stricter handling of the
kernel. I have done that for mine[2].

[1] http://www.pegatech.com/
[2] https://sourceforge.net/projects/notetakerpen/

Signed-off-by: Kurt Garloff &lt;kurt@garloff.de&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbfs: Allow printer class 'get_device_id' without needing to claim the intf</title>
<updated>2013-07-25T19:01:12Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2013-07-12T08:04:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5dc50c357d5ce8f78e148d20a38e4e66b12d550f'/>
<id>urn:sha1:5dc50c357d5ce8f78e148d20a38e4e66b12d550f</id>
<content type='text'>
For certain (HP) printers the printer device_id does not only contain a
static part identifying the printer, but it also contains a dynamic part
giving printer status, ink level, etc.

To get to this info various userspace utilities need to be able to make a
printer class 'get_device_id' request without first claiming the interface
(as that is in use for the actual printer driver).

Since the printer class 'get_device_id' request does not change interface
settings in anyway, allowing this without claiming the interface should not
cause any issues.

CC: Sanjay Kumar &lt;sanjay.kumar14@hp.com&gt;
CC: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.10-rc5 into usb-next</title>
<updated>2013-06-09T04:27:51Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-06-09T04:27:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=141dc40ee343ab532717b235dd645e2d25ae3092'/>
<id>urn:sha1:141dc40ee343ab532717b235dd645e2d25ae3092</id>
<content type='text'>
We need the changes in this branch.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbfs: Increase arbitrary limit for USB 3 isopkt length</title>
<updated>2013-05-29T08:06:36Z</updated>
<author>
<name>Federico Manzan</name>
<email>f.manzan@gmail.com</email>
</author>
<published>2013-05-24T16:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e2e2f0ea1c935edcf53feb4c4c8fdb4f86d57dd9'/>
<id>urn:sha1:e2e2f0ea1c935edcf53feb4c4c8fdb4f86d57dd9</id>
<content type='text'>
Increase the current arbitrary limit for isocronous packet size to a
value large enough to account for USB 3.0 super bandwidth streams,
bMaxBurst (0~15 allowed, 1~16 packets)
bmAttributes (bit 1:0, mult 0~2, 1~3 packets)
so the size max for one USB 3 isocronous transfer is
1024 byte * 16 * 3 = 49152 byte

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Federico Manzan &lt;f.manzan@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: devio: Fixed error: 'do not use assignment in if condition'</title>
<updated>2013-05-17T17:05:57Z</updated>
<author>
<name>Tülin İzer</name>
<email>tulinizer@gmail.com</email>
</author>
<published>2013-05-17T07:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4baf0df7010e8d975edcd778604fc1b1fce30f37'/>
<id>urn:sha1:4baf0df7010e8d975edcd778604fc1b1fce30f37</id>
<content type='text'>
This patch fixes error: 'do not use assignment in if condition'
in USB/devio.c.

Signed-off-by: Tülin İzer &lt;tulinizer@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: devio: Fixed macro parenthesis error</title>
<updated>2013-05-17T17:05:57Z</updated>
<author>
<name>Tülin İzer</name>
<email>tulinizer@gmail.com</email>
</author>
<published>2013-05-17T07:13:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fa86ad0b63846d35b6989cefe24e46301b94a9f3'/>
<id>urn:sha1:fa86ad0b63846d35b6989cefe24e46301b94a9f3</id>
<content type='text'>
This patch fixes error 'Macros with complex values should be enclosed in
parenthesis' in USB/devio.c

Signed-off-by: Tülin İzer &lt;tulinizer@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: devio: Fixed warning: 'use &lt;linux/uacces.h&gt; instead &lt;asm/uacces.h&gt;'</title>
<updated>2013-05-17T17:05:56Z</updated>
<author>
<name>Tülin İzer</name>
<email>tulinizer@gmail.com</email>
</author>
<published>2013-05-17T07:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e6889b310eb997afe698fac9762203e11577af1e'/>
<id>urn:sha1:e6889b310eb997afe698fac9762203e11577af1e</id>
<content type='text'>
This patch fixes warning: 'use &lt;linux/uacces.h&gt; instead &lt;asm/uacces.h&gt;'
found by checkpatch in usb/devio.c.

Signed-off-by: Tülin İzer &lt;tulinizer@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbfs: Always allow ctrl requests with USB_RECIP_ENDPOINT on the ctrl ep</title>
<updated>2013-04-17T17:01:22Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2013-04-16T09:08:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1361bf4b9f9ef45e628a5b89e0fd9bedfdcb7104'/>
<id>urn:sha1:1361bf4b9f9ef45e628a5b89e0fd9bedfdcb7104</id>
<content type='text'>
When usbfs receives a ctrl-request from userspace it calls check_ctrlrecip,
which for a request with USB_RECIP_ENDPOINT tries to map this to an interface
to see if this interface is claimed, except for ctrl-requests with a type of
USB_TYPE_VENDOR.

When trying to use this device: http://www.akaipro.com/eiepro
redirected to a Windows vm running on qemu on top of Linux.

The windows driver makes a ctrl-req with USB_TYPE_CLASS and
USB_RECIP_ENDPOINT with index 0, and the mapping of the endpoint (0) to
the interface fails since ep 0 is the ctrl endpoint and thus never is
part of an interface.

This patch fixes this ctrl-req failing by skipping the checkintf call for
USB_RECIP_ENDPOINT ctrl-reqs on the ctrl endpoint.

Reported-by: Dave Stikkolorum &lt;d.r.stikkolorum@hhs.nl&gt;
Tested-by: Dave Stikkolorum &lt;d.r.stikkolorum@hhs.nl&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2013-02-27T04:16:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-02-27T04:16:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d895cb1af15c04c522a25c79cc429076987c089b'/>
<id>urn:sha1:d895cb1af15c04c522a25c79cc429076987c089b</id>
<content type='text'>
Pull vfs pile (part one) from Al Viro:
 "Assorted stuff - cleaning namei.c up a bit, fixing -&gt;d_name/-&gt;d_parent
  locking violations, etc.

  The most visible changes here are death of FS_REVAL_DOT (replaced with
  "has -&gt;d_weak_revalidate()") and a new helper getting from struct file
  to inode.  Some bits of preparation to xattr method interface changes.

  Misc patches by various people sent this cycle *and* ocfs2 fixes from
  several cycles ago that should've been upstream right then.

  PS: the next vfs pile will be xattr stuff."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
  saner proc_get_inode() calling conventions
  proc: avoid extra pde_put() in proc_fill_super()
  fs: change return values from -EACCES to -EPERM
  fs/exec.c: make bprm_mm_init() static
  ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
  ocfs2: fix possible use-after-free with AIO
  ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
  get_empty_filp()/alloc_file() leave both -&gt;f_pos and -&gt;f_version zero
  target: writev() on single-element vector is pointless
  export kernel_write(), convert open-coded instances
  fs: encode_fh: return FILEID_INVALID if invalid fid_type
  kill f_vfsmnt
  vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
  nfsd: handle vfs_getattr errors in acl protocol
  switch vfs_getattr() to struct path
  default SET_PERSONALITY() in linux/elf.h
  ceph: prepopulate inodes only when request is aborted
  d_hash_and_lookup(): export, switch open-coded instances
  9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
  9p: split dropping the acls from v9fs_set_create_acl()
  ...
</content>
</entry>
<entry>
<title>new helper: file_inode(file)</title>
<updated>2013-02-23T04:31:31Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-01-23T22:07:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=496ad9aa8ef448058e36ca7a787c61f2e63f0f54'/>
<id>urn:sha1:496ad9aa8ef448058e36ca7a787c61f2e63f0f54</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
