|
|
Created:
4 years, 11 months ago by Reilly Grant (use Gerrit) Modified:
4 years, 10 months ago CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionParse USB interface association descriptors.
USB interface association descriptors are used to combine multiple
interfaces into a single functional group. This patch adds support for
parsing them out of the |extra_data| field left by libusb's parsing of
configuration, interface and endpoint descriptors. The resulting
association is then represented by setting the |first_interface| field
of each interface in a function to the |interface_number| of the first
interface in the function.
WebUSB will use these associations to set permissions for an entire
function with a single descriptor.
BUG=492204
Committed: https://crrev.com/b61e467059e55ad71f1b7ae5e1412beb3d4803e0
Cr-Commit-Position: refs/heads/master@{#375324}
Patch Set 1 : #Patch Set 2 : Rebased. #
Total comments: 4
Patch Set 3 : Remove unnecessary default/delete. #
Total comments: 2
Messages
Total messages: 32 (16 generated)
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
Description was changed from ========== Parse USB interface association descriptors. USB interface association descriptors are used to combine multiple interfaces into a single functional group. This patch adds support for parsing them out of the |extra_data| field left by libusb's parsing of configuration, interface and endpoint descriptors. The resulting association is then represented by setting the |first_interface| field of each interface in a function to the |interface_number| of the first interface in the function. WebUSB uses these associations to set permissions for an entire function with one descriptor. BUG=492204 ========== to ========== Parse USB interface association descriptors. USB interface association descriptors are used to combine multiple interfaces into a single functional group. This patch adds support for parsing them out of the |extra_data| field left by libusb's parsing of configuration, interface and endpoint descriptors. The resulting association is then represented by setting the |first_interface| field of each interface in a function to the |interface_number| of the first interface in the function. WebUSB will use these associations to set permissions for an entire function with a single descriptor. BUG=492204 ==========
reillyg@chromium.org changed reviewers: + pfeldman@chromium.org, rockot@chromium.org
reillyg@chromium.org changed reviewers: + stevenjb@chromium.org
rockot@, please look at //device pfeldman@, please look at //chrome/browser/devtools stevenjb@, please look at //chrome/browser/chromeos
devtools lgtm
c/b/chromeos lgtm
reillyg@chromium.org changed reviewers: - pfeldman@chromium.org, stevenjb@chromium.org
Patchset #2 (id:60001) has been deleted
rockot@, ping. Now that I've landed https://codereview.chromium.org/1468423003/ I didn't actually need Pavel and Steven's reviews.
rockot@chromium.org changed reviewers: + pfeldman@chromium.org, stevenjb@chromium.org
lgtm https://codereview.chromium.org/1568673002/diff/80001/device/usb/usb_descript... File device/usb/usb_descriptors.cc (right): https://codereview.chromium.org/1568673002/diff/80001/device/usb/usb_descript... device/usb/usb_descriptors.cc:34: UsbInterfaceAssociationDescriptor() = delete; I'm fairly sure that this is implied by defining a non-zero-argument constructor https://codereview.chromium.org/1568673002/diff/80001/device/usb/usb_descript... device/usb/usb_descriptors.cc:35: ~UsbInterfaceAssociationDescriptor() = default; Isn't this also implied given that the struct is only POD?
https://codereview.chromium.org/1568673002/diff/80001/device/usb/usb_descript... File device/usb/usb_descriptors.cc (right): https://codereview.chromium.org/1568673002/diff/80001/device/usb/usb_descript... device/usb/usb_descriptors.cc:34: UsbInterfaceAssociationDescriptor() = delete; On 2016/02/12 19:25:01, Ken Rockot wrote: > I'm fairly sure that this is implied by defining a non-zero-argument constructor You're right. https://codereview.chromium.org/1568673002/diff/80001/device/usb/usb_descript... device/usb/usb_descriptors.cc:35: ~UsbInterfaceAssociationDescriptor() = default; On 2016/02/12 19:25:01, Ken Rockot wrote: > Isn't this also implied given that the struct is only POD? Indeed. I just got overly excited about default and delete.
The CQ bit was checked by reillyg@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from stevenjb@chromium.org, pfeldman@chromium.org, rockot@chromium.org Link to the patchset: https://codereview.chromium.org/1568673002/#ps100001 (title: "Remove unnecessary default/delete.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1568673002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1568673002/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chro...)
The CQ bit was checked by reillyg@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1568673002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1568673002/100001
Message was sent while issue was closed.
Description was changed from ========== Parse USB interface association descriptors. USB interface association descriptors are used to combine multiple interfaces into a single functional group. This patch adds support for parsing them out of the |extra_data| field left by libusb's parsing of configuration, interface and endpoint descriptors. The resulting association is then represented by setting the |first_interface| field of each interface in a function to the |interface_number| of the first interface in the function. WebUSB will use these associations to set permissions for an entire function with a single descriptor. BUG=492204 ========== to ========== Parse USB interface association descriptors. USB interface association descriptors are used to combine multiple interfaces into a single functional group. This patch adds support for parsing them out of the |extra_data| field left by libusb's parsing of configuration, interface and endpoint descriptors. The resulting association is then represented by setting the |first_interface| field of each interface in a function to the |interface_number| of the first interface in the function. WebUSB will use these associations to set permissions for an entire function with a single descriptor. BUG=492204 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:100001)
Message was sent while issue was closed.
gab@chromium.org changed reviewers: + gab@chromium.org
Message was sent while issue was closed.
https://codereview.chromium.org/1568673002/diff/100001/device/usb/usb_descrip... File device/usb/usb_descriptors.cc (right): https://codereview.chromium.org/1568673002/diff/100001/device/usb/usb_descrip... device/usb/usb_descriptors.cc:191: interface_it != interfaces.end() && This is wrong as if the inner loop exits because this hit the end, the outer loop will proceed with another increment prior to verifying its condition and thus will go past the end. http://crbug.com/586824 I will revert this CL for now as it otherwise makes Chrome hang when using USB devices. Hopefully tomorrow's Canary picks up the revert. Also: feels like this should be unit-tested.
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:100001) has been created in https://codereview.chromium.org/1697863003/ by gab@chromium.org. The reason for reverting is: http://crbug.com/586824 Makes Chrome hang when using USB devices..
Message was sent while issue was closed.
https://codereview.chromium.org/1568673002/diff/100001/device/usb/usb_descrip... File device/usb/usb_descriptors.cc (right): https://codereview.chromium.org/1568673002/diff/100001/device/usb/usb_descrip... device/usb/usb_descriptors.cc:191: interface_it != interfaces.end() && On 2016/02/14 21:02:17, gab (OOO until Tuesday 16th) wrote: > This is wrong as if the inner loop exits because this hit the end, the outer > loop will proceed with another increment prior to verifying its condition and > thus will go past the end. > > http://crbug.com/586824 > > I will revert this CL for now as it otherwise makes Chrome hang when using USB > devices. Hopefully tomorrow's Canary picks up the revert. > > Also: feels like this should be unit-tested. Apologies, looks like there is a unit test, but it doesn't trigger this issue, should probably add a case that hits the end in the inner-loop. Cheers!
Message was sent while issue was closed.
Patchset #4 (id:120001) has been deleted
Message was sent while issue was closed.
Description was changed from ========== Parse USB interface association descriptors. USB interface association descriptors are used to combine multiple interfaces into a single functional group. This patch adds support for parsing them out of the |extra_data| field left by libusb's parsing of configuration, interface and endpoint descriptors. The resulting association is then represented by setting the |first_interface| field of each interface in a function to the |interface_number| of the first interface in the function. WebUSB will use these associations to set permissions for an entire function with a single descriptor. BUG=492204 ========== to ========== Parse USB interface association descriptors. USB interface association descriptors are used to combine multiple interfaces into a single functional group. This patch adds support for parsing them out of the |extra_data| field left by libusb's parsing of configuration, interface and endpoint descriptors. The resulting association is then represented by setting the |first_interface| field of each interface in a function to the |interface_number| of the first interface in the function. WebUSB will use these associations to set permissions for an entire function with a single descriptor. BUG=492204 Committed: https://crrev.com/b61e467059e55ad71f1b7ae5e1412beb3d4803e0 Cr-Commit-Position: refs/heads/master@{#375324} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/b61e467059e55ad71f1b7ae5e1412beb3d4803e0 Cr-Commit-Position: refs/heads/master@{#375324}
Message was sent while issue was closed.
On 2016/02/16 22:46:57, commit-bot: I haz the power wrote: > Patchset 3 (id:??) landed as > https://crrev.com/b61e467059e55ad71f1b7ae5e1412beb3d4803e0 > Cr-Commit-Position: refs/heads/master@{#375324} Hmmm? This was relanded without the fix?
Message was sent while issue was closed.
On 2016/02/16 22:48:45, gab wrote: > On 2016/02/16 22:46:57, commit-bot: I haz the power wrote: > > Patchset 3 (id:??) landed as > > https://crrev.com/b61e467059e55ad71f1b7ae5e1412beb3d4803e0 > > Cr-Commit-Position: refs/heads/master@{#375324} > > Hmmm? This was relanded without the fix? Nvm, looks like commit-bot is going nuts commenting on all the issues it landed long ago.. |