From: Natasha Klaus <natalie.klaus@runtimeverification.com>
To: laurent.pinchart@ideasonboard.com
Cc: david.laight.linux@gmail.com, hansg@kernel.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
mchehab@kernel.org, natalie.klaus@runtimeverification.com,
noambs2999@gmail.com, ribalda@chromium.org,
stable@vger.kernel.org
Subject: Re: [PATCH v3 2/3] media: uvcvideo: Fix integer overflow in frame buffer size calculation
Date: Wed, 30 Sep 2026 11:58:44 +0300 [thread overview]
Message-ID: <20260930085844.150633-1-natalie.klaus@runtimeverification.com> (raw)
In-Reply-To: <20260928205331.GM4406@killaraus.ideasonboard.com>
On Mon, Sep 28, 2026, Laurent Pinchart wrote:
> Is this patch missing an Assisted-by tag ?
Yes, and I should have disclosed it in v3. I used Claude Code for
this series:
- 1/3: Ricardo's design, from his diff on the list. Claude Code
applied it, found it did not build (alts left unused) and wrote
the dev_warn() text.
- 3/3: my design (skip rather than reject, inside the uncompressed
branch, same approach as 81f3affa19d6). Claude Code wrote the code,
I wrote the comment.
- Commit messages and notes: drafted by Claude Code from a list of
required content I gave it, then edited by me. In 2/3 this covers
my changes to Noam's text, not his original.
- Analysis: the call path analysis in my review mails and the zero
size case behind 3/3 were found by Claude Code. I spot-checked
them against the tree.
I reviewed and approved every change and built each commit. v4 will
carry Assisted-by on all three patches, say in 3/3 how the zero size
case was found, and describe the tool use in the cover letter.
The original patch in 2/3 is Noam's. I have asked him to answer for
his part.
> I also want to know what device this has been tested with.
No physical device. Only Noam's UVC gadget over dummy_hcd, details
in my reply on 1/3.
> > + bufsize = DIV_ROUND_UP_ULL((u64)format->bpp * frame->wWidth *
> > + frame->wHeight, BITS_PER_BYTE);
>
> See the reply I just sent on v1.
Thanks for the numbers. If width * bpp is always a multiple of 8,
rounding up and truncating give the same result on any real device.
They differ only for descriptors that are already broken. I kept
DIV_ROUND_UP_ULL to match the FORCE_BPP path in uvc_parse_format().
I can go back to a plain shift if you prefer. Which one do you want
in v4?
Natasha
next prev parent reply other threads:[~2026-09-30 8:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 11:15 [PATCH v3 0/3] media: uvcvideo: harden the frame buffer size computation Natasha Klaus
2026-08-20 11:15 ` [PATCH v3 1/3] media: uvcvideo: Let uvc_parse_frame() report a skipped frame Natasha Klaus
2026-09-28 20:50 ` Laurent Pinchart
2026-09-30 10:33 ` Natasha Klaus
2026-08-20 11:15 ` [PATCH v3 2/3] media: uvcvideo: Fix integer overflow in frame buffer size calculation Natasha Klaus
2026-09-28 20:53 ` Laurent Pinchart
2026-09-30 8:58 ` Natasha Klaus [this message]
2026-08-20 11:15 ` [PATCH v3 3/3] media: uvcvideo: Skip frame descriptors with a zero computed size Natasha Klaus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260930085844.150633-1-natalie.klaus@runtimeverification.com \
--to=natalie.klaus@runtimeverification.com \
--cc=david.laight.linux@gmail.com \
--cc=hansg@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=noambs2999@gmail.com \
--cc=ribalda@chromium.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®