linux/drivers/media/platform/rockchip/rkvdec
Michael Bommarito 81ad46bb33 media: rkvdec: bound HEVC tile loops and PPS id to the array capacity
compute_tiles_uniform() and compute_tiles_non_uniform() loop over
num_tile_columns_minus1 + 1 / num_tile_rows_minus1 + 1 entries, and
assemble_hw_pps() writes one COLUMN_WIDTH / ROW_HEIGHT register per tile
and indexes priv_tbl->param_set[] by pic_parameter_set_id, all taken from
the untrusted PPS. Use the bounded v4l2_hevc_pps_num_tile_columns() /
v4l2_hevc_pps_num_tile_rows() helpers for the tile loops, and bail out of
assemble_hw_pps() before indexing priv_tbl->param_set[] with an
out-of-range pic_parameter_set_id, so the writes stay within the hardware
tables.

Fixes: 3595375c23 ("media: rkvdec: Add HEVC backend")
Fixes: c9a59dc2ac ("media: rkvdec: Add HEVC support for the VDPU381 variant")
Assisted-by: Claude:claude-opus-4-8
Cc: stable@vger.kernel.org
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-09-07 09:01:05 +02:00
..
Kconfig
Makefile media: rkvdec: Add HEVC support for the VDPU383 variant 2026-01-21 14:43:10 +01:00
rkvdec-bitwriter.h media: rkvdec: Introduce a global bitwriter helper 2026-05-04 09:31:04 +02:00
rkvdec-cabac.c media: rkvdec: Move cabac tables to their own source file 2026-01-21 14:43:09 +01:00
rkvdec-cabac.h media: rkvdec: Move cabac tables to their own source file 2026-01-21 14:43:09 +01:00
rkvdec-h264-common.c media: rkvdec: common: Drop bitfields for the bitwriter 2026-05-04 09:31:04 +02:00
rkvdec-h264-common.h media: rkvdec: common: Drop bitfields for the bitwriter 2026-05-04 09:31:04 +02:00
rkvdec-h264.c media: rkvdec: Use the global bitwriter instead of local one 2026-05-04 09:31:04 +02:00
rkvdec-hevc-common.c media: rkvdec: bound HEVC tile loops and PPS id to the array capacity 2026-09-07 09:01:05 +02:00
rkvdec-hevc-common.h media: rkvdec: common: Drop bitfields for the bitwriter 2026-05-04 09:31:04 +02:00
rkvdec-hevc.c media: rkvdec: bound HEVC tile loops and PPS id to the array capacity 2026-09-07 09:01:05 +02:00
rkvdec-rcb.c media: rkvdec: Add RCB and SRAM support 2026-01-21 14:43:09 +01:00
rkvdec-rcb.h media: rkvdec: Add RCB and SRAM support 2026-01-21 14:43:09 +01:00
rkvdec-regs.h media: rkvdec: Switch to using structs instead of writel 2026-01-21 14:43:09 +01:00
rkvdec-vdpu381-h264.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rkvdec-vdpu381-hevc.c media: rkvdec: bound HEVC tile loops and PPS id to the array capacity 2026-09-07 09:01:05 +02:00
rkvdec-vdpu381-regs.h media: rkvdec: Add H264 support for the VDPU381 variant 2026-01-21 14:43:10 +01:00
rkvdec-vdpu383-h264.c media: rkvdec: vdpu383: Drop bitfields for the bitwriter 2026-05-04 09:31:04 +02:00
rkvdec-vdpu383-hevc.c media: rkvdec: use DIV_ROUND_UP() for CTB counts 2026-07-17 12:36:48 +02:00
rkvdec-vdpu383-regs.h media: rkvdec: Add H264 support for the VDPU383 variant 2026-01-21 14:43:10 +01:00
rkvdec-vp9.c media: rkvdec: reduce stack usage in rkvdec_init_v4l2_vp9_count_tbl() 2026-03-18 11:21:31 +01:00
rkvdec.c media: rkvdec: Propagate platform_get_irq() errors 2026-07-17 12:36:48 +02:00
rkvdec.h media: rkvdec: Add HEVC support for the VDPU383 variant 2026-01-21 14:43:10 +01:00