-
Notifications
You must be signed in to change notification settings - Fork 8k
[Backport v4.2-branch] uvc: improve standard compliance and MacOS compat #93678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4.2-branch
Are you sure you want to change the base?
Conversation
Some OSes like MacOS use shorter UVC 1.1 probe/commit messages even when UVC 1.5 is supported, without bUsage, bBitDepthLuma, bmSettings, bMaxNumberOfRefFramesPlus1, bmRateControlModes bmLayoutPerStream. Accept messages of arbitrary size to safely be processed, ignoring all missing fields, improving standard compliance. Signed-off-by: Josuah Demangeon <[email protected]> (cherry picked from commit ed9327d)
Due to the alignment and granularity requirements of memory allocation, setup->wLength is shorter than the allocated buffer size. This lead to responses larger than what the host requested, which it rejected. Fix it by using the minimum between the allocated size, the struct size, and the wLength requested. Signed-off-by: Josuah Demangeon <[email protected]> (cherry picked from commit 366c64e)
@josuah this is set for a backport but the commit messages read (to me) as more of a new feature than a bug fix. Is there an issue for for this? |
The message could be read as "usb: uvc: allow the host to use short probe/commit messages [as required by the standard]". So it is not a "bug" in the sense of a crash or a security issue, only a non-compliance with the standard which caused problems with some OS.
No. I am away this week but will try to add one tonight to help. |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
@josuah still needs an issue. We're prepping a 4.2.1 release |
Backport 366c64e~2..366c64e from #92320.