Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: v4l2-ctrls: document expected validation scope
@ 2026-07-01  8:11 Linus Walleij
  2026-07-01  8:50 ` Jacopo Mondi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Linus Walleij @ 2026-07-01  8:11 UTC (permalink / raw)
  To: Laurent Pinchart, Vincenzo Frascino, Jacopo Mondi, Nayden Kanchev,
	Konstantin Babin, Daniel Scally, Mauro Carvalho Chehab
  Cc: linux-media, Linus Walleij

After discussion on the mailing list it became clear that these
validations are not expected to be exhaustive.

Link: https://lore.kernel.org/linux-media/20260629133209.GG3054459@killaraus.ideasonboard.com/
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
 Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst b/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst
index b8698b85bd80..58184b6e386f 100644
--- a/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst
+++ b/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst
@@ -118,6 +118,18 @@ correct. This prevents the situation where only some of the controls
 were set/get. Only low-level errors (e. g. a failed i2c command) can
 still cause this situation.
 
+The validation of controls is not expected to be exhaustive, for example
+custom controls under ``V4L2_CTRL_CLASS_USER`` would become very voluminous.
+The expected behaviour is to reject settings that could:
+
+1. Pose stability issues, such as turning the hardware unresponsive requiring
+   a hard reset, such controls must be rejected.
+
+2. Pose security issues, such as compromising unrelated kernel-contained
+   data to userspace.
+
+Extended validation of control values should be performed in userspace.
+
 .. tabularcolumns:: |p{6.8cm}|p{4.0cm}|p{6.5cm}|
 
 .. c:type:: v4l2_ext_control

---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260701-v4l2-doc-c60195d38d00

Best regards,
--  
Linus Walleij <linusw@kernel.org>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-01 15:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-07-01 15:05 ` Vincenzo Frascino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox