From: Hans Verkuil <hverkuil+cisco@kernel.org>
To: Linus Walleij <linusw@kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
Nayden Kanchev <nayden.kanchev@arm.com>,
Konstantin Babin <Konstantin.Babin@arm.com>,
Daniel Scally <dan.scally@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] media: v4l2-ctrls: document expected validation scope
Date: Wed, 1 Jul 2026 13:16:56 +0200 [thread overview]
Message-ID: <ef33a972-e1dd-4fb5-8b96-ec33522814f0@kernel.org> (raw)
In-Reply-To: <CAD++jLmzWMWjV4-MThJe+30TqF0f=EmdMka=8eTPOagHWAsXUA@mail.gmail.com>
On 01/07/2026 12:59, Linus Walleij wrote:
> Hi Hans,
>
> thanks for clarifying!
>
> On Wed, Jul 1, 2026 at 11:03 AM Hans Verkuil <hverkuil+cisco@kernel.org> wrote:
>
>> The main change here is that it explicitly states that S_EXT_CTRLS implies
>> a call to TRY_EXT_CTRLS is called. Something that was never clearly stated
>> before, but it's important to know this. Because of this change the TRY_EXT_CTRLS
>> and S_EXT_CTRLS paragraphs are swapped since S_EXT_CTRLS now refers to
>> TRY_EXT_CTRLS.
>>
>> And the TRY_EXT_CTRLS documentation already says that: "It is up to the driver
>> whether wrong values are automatically adjusted to a valid value or if an error is
>> returned."
>
> This works for me, I missed that because I'm a rookie at this.
No problem!
>
> For the above diff (I guess you want to send the patch? Else
> I can make it):
> Acked-by: Linus Walleij <linusw@kernel.org>
I posted a clean patch for this with your Acked-by.
>
>> I just saw Jacopo's reply that the discussion was for parameter buffers, not
>> for extended controls, but the reasoning is the same: the driver must validate
>> at some point (ideally when the buffer is queued up so userspace gets the error
>> immediately), and ensure there are no security or stability issues. But if there
>> are, then that's just a driver bug.
>
> I get it, thanks!
Regards,
Hans
next prev parent reply other threads:[~2026-07-01 11:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 8:11 [PATCH] media: v4l2-ctrls: document expected validation scope Linus Walleij
2026-07-01 8:50 ` Jacopo Mondi
2026-07-01 9:03 ` Hans Verkuil
2026-07-01 10:59 ` Linus Walleij
2026-07-01 11:16 ` Hans Verkuil [this message]
2026-07-01 15:05 ` Vincenzo Frascino
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=ef33a972-e1dd-4fb5-8b96-ec33522814f0@kernel.org \
--to=hverkuil+cisco@kernel.org \
--cc=Konstantin.Babin@arm.com \
--cc=dan.scally@ideasonboard.com \
--cc=jacopo.mondi@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linusw@kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nayden.kanchev@arm.com \
--cc=vincenzo.frascino@arm.com \
/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