Re: [PATCH] usbcore: Add quirk for 255-bytes initial config read
From: Alan Stern
Date: Tue Jun 23 2026 - 09:18:02 EST
On Tue, Jun 23, 2026 at 01:01:12PM +0530, Nikhil Solanke wrote:
> I have a v2 patch ready with all the requested changes along with the
> documentation in Documentation/admin-guide/kernel-parameters.txt. Is
> there any other place where I have to write documentation?
No.
> Also, I would like to know the "low-level" type reason as to why do we
> have 2 separate buffers. a desc and then a bigbuffer? Why don't we
> just realloc the desc buffer? Does this have something to do with
> reallocs in general?
No particular reason. I guess it just seemed more straightforward to
allocate a second, larger buffer than to expand the first, smaller
buffer.
> Also (a bit more tangent), can the usb device potentially fingerprint
> the host os? if we are asking for 9 bytes first and windows ask for
> 255, is it possible that some usb devices will fingerprint the OS
> based on this, and behave differently? are there any other such places
> where fingerprinting is possible? In those cases, is it theoretically
> possible that this patch might fix some weird devices that "seem to
> work" on windows but not on linux?
Of course it's possible. Devices can do whatever they want, as long as
they obey the requirements of the USB spec.
> I might just add this one line to
> documentation that it might theoretically fix other usb devices as
> well instead of it just being a quirk to fix a game controller.
Isn't that true of any quirk? As a theoretical possibility, I mean.
Alan Stern