linux/drivers/media/platform/allegro-dvt
Kees Cook d425557814 media: allegro: Annotate struct mcu_msg_push_buffers_internal with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for
struct mcu_msg_push_buffers_internal.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: Michael Tretter <m.tretter@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-10-07 10:55:45 +02:00
..
allegro-core.c media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
allegro-mail.c media: allegro-dvt: increase buffer size in msg_type_name() 2023-09-27 10:47:22 +02:00
allegro-mail.h media: allegro: Annotate struct mcu_msg_push_buffers_internal with __counted_by 2023-10-07 10:55:45 +02:00
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile media: allegro: add HEVC NAL unit generator 2021-01-27 16:04:04 +01:00
nal-h264.c media: allegro: extract nal value lookup functions to header 2021-10-20 15:59:41 +01:00
nal-h264.h media: allegro: write correct colorspace into SPS 2021-10-20 16:00:28 +01:00
nal-hevc.c media: allegro: nal-hevc: implement generator for vui 2021-10-20 16:01:23 +01:00
nal-hevc.h media: allegro: write vui parameters for HEVC 2021-10-20 16:02:03 +01:00
nal-rbsp.c media: allegro: add helper to report unsupported fields 2021-01-27 15:52:23 +01:00
nal-rbsp.h media: allegro: add helper to report unsupported fields 2021-01-27 15:52:23 +01:00