linux/drivers/leds/flash
Kees Cook e3c9d95213 leds: mt6370: Annotate struct mt6370_priv 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 mt6370_priv.

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

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230915201051.never.429-kees@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-01 11:28:41 +00:00
..
Kconfig leds: flash: leds-qcom-flash: Declare the driver as a module 2023-07-28 12:17:23 +01:00
leds-aat1290.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
leds-as3645a.c leds: as3645a: Replace strlcpy with strscpy 2023-05-25 12:44:25 +01:00
leds-ktd2692.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
leds-lm3601x.c leds: Switch i2c drivers back to use .probe() 2023-05-25 12:16:22 +01:00
leds-max77693.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
leds-mt6360.c leds: mt6360: Annotate struct mt6360_priv with __counted_by 2023-11-01 11:28:40 +00:00
leds-mt6370-flash.c leds: mt6370: Annotate struct mt6370_priv with __counted_by 2023-11-01 11:28:41 +00:00
leds-qcom-flash.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
leds-rt4505.c leds: Switch i2c drivers back to use .probe() 2023-05-25 12:16:22 +01:00
leds-rt8515.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
leds-sgm3140.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
Makefile leds: flash: mt6370: Add MediaTek MT6370 flashlight support 2023-03-23 14:54:08 +00:00