linux-sg2042/drivers/media/v4l2-core
Hans Verkuil 5eef214177 media: v4l2-dv-timings.c: fix too strict blanking sanity checks
Sanity checks were added to verify the v4l2_bt_timings blanking fields
in order to avoid integer overflows when userspace passes weird values.

But that assumed that userspace would correctly fill in the front porch,
backporch and sync values, but sometimes all you know is the total
blanking, which is then assigned to just one of these fields.

And that can fail with these checks.

So instead set a maximum for the total horizontal and vertical
blanking and check that each field remains below that.

That is still sufficient to avoid integer overflows, but it also
allows for more flexibility in how userspace fills in these fields.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 4b6d66a45e ("media: v4l2-dv-timings: add sanity checks for blanking values")
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-11-23 12:02:30 +00:00
..
Kconfig media: Replace dependency on VIDEO_V4L2_SUBDEV_API with select 2022-07-15 15:19:48 +01:00
Makefile media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
tuner-core.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
v4l2-async.c media: v4l2-async: Add notifier operation to destroy asd instances 2022-07-17 11:20:08 +01:00
v4l2-common.c media: v4l: move helper functions for fractions from uvc to v4l2-common 2022-09-22 15:52:30 +02:00
v4l2-compat-ioctl32.c media: v4l2-compat-ioctl32.c: zero buffer passed to v4l2_compat_get_array_args() 2022-09-27 10:24:43 +02:00
v4l2-ctrls-api.c media: v4l2-ctrls: drop 'elems' argument from control type ops. 2022-09-24 08:49:06 +02:00
v4l2-ctrls-core.c media: v4l2-ctrls: drop 'elems' argument from control type ops. 2022-09-24 08:49:06 +02:00
v4l2-ctrls-defs.c media: uapi: Add V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS control 2022-07-15 17:36:44 +01:00
v4l2-ctrls-priv.h media: v4l2-ctrls: add support for dynamically allocated arrays. 2022-07-15 16:20:53 +01:00
v4l2-ctrls-request.c media: v4l2-ctrls: add support for dynamically allocated arrays. 2022-07-15 16:20:53 +01:00
v4l2-dev.c media: mc: convert pipeline funcs to take media_pad 2022-09-24 09:22:30 +02:00
v4l2-device.c media: v4l: subdev: Set sd->devnode before registering the subdev 2020-12-02 15:55:44 +01:00
v4l2-dv-timings.c media: v4l2-dv-timings.c: fix too strict blanking sanity checks 2022-11-23 12:02:30 +00:00
v4l2-event.c media: v4l2-event: Modified variable type 'unsigned' to 'unsigned int' 2021-06-17 10:22:59 +02:00
v4l2-fh.c media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release 2021-06-02 13:17:44 +02:00
v4l2-flash-led-class.c media: v4l2-flash: Fix comment typo 2022-08-29 15:32:14 +02:00
v4l2-fwnode.c media: media/v4l2-core: Add enum V4L2_FWNODE_BUS_TYPE_DPI 2022-05-17 09:09:59 +02:00
v4l2-h264.c media: v4l2: Reorder field reflist 2022-05-17 10:03:11 +02:00
v4l2-i2c.c media: v4l2-core: v4l2-i2c: convert to new API with ERRPTR 2020-02-24 15:21:52 +01:00
v4l2-ioctl.c media updates for v6.1-rc1 2022-10-07 11:04:35 -07:00
v4l2-jpeg.c media: Avoid parsing quantization and huffman tables 2021-03-22 10:40:13 +01:00
v4l2-mc.c media: v4l2-mc: fix a warning message 2021-03-22 13:06:39 +01:00
v4l2-mem2mem.c media: media/v4l2-mem2mem.h: rename 'videobuf' to 'vb2' 2022-08-29 15:47:03 +02:00
v4l2-spi.c v4l2-core: fix coding style for the two new c files 2019-08-26 11:01:25 -03:00
v4l2-subdev.c media: v4l2-subdev.c: kvmalloc_array -> kvcalloc 2022-05-13 11:02:22 +02:00
v4l2-trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v4l2-vp9.c media: Add VP9 v4l2 library 2021-11-22 07:47:13 +00:00
videobuf-core.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
videobuf-dma-contig.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
videobuf-dma-sg.c media: videobuf-dma-sg: void function return statements are not generally useful 2021-06-02 14:18:36 +02:00
videobuf-vmalloc.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00