lkml.org 
[lkml]   [2012]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] usbhid: Check HID report descriptor contents after USB device reset
On Tue, 3 Apr 2012, Simon Haggett wrote:

> When a USB device reset occurs, usbcore will refetch the device and configuration
> descriptors and compare them with those retrieved before the reset to ensure
> that they have not changed. For USB HID devices, this implicitly includes the
> HID class descriptor (as this is fetched with the configuration descriptor).
> However, the HID report descriptor is not checked again.
>
> Whilst a change in the size of the HID report descriptor will be detected (as
> this is held in the class descriptor), content changes to the report descriptor
> which do not result in a change in its size will be missed. If a firmware update
> were applied to a USB HID device which resulted in such a change to the report
> descriptor after device reset, then this would not be picked up by usbhid.

Simon,

thanks for the patch. Actually the firmware update is not the only option
how this could happen -- there are HID bus drivers which actually patch
the report descriptor of the device before it is fed to the parser.

Your patch fixes the issue for those as well.

Applied, thanks.

--
Jiri Kosina
SUSE Labs


\
 
 \ /
  Last update: 2012-04-04 00:15    [W:0.050 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site