summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-lm3697.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2023-09-15 23:10:04 +0300
committerLee Jones <lee@kernel.org>2023-11-01 14:28:29 +0300
commit52cd75108a426bdd43161d0e73e7bee95d103ed1 (patch)
tree10102040df4e8faf4cdb79b4a6189f6bd8ea8a18 /drivers/leds/leds-lm3697.c
parenta29feca113687cc691fe9f0f23652fafbafddc90 (diff)
downloadlinux-52cd75108a426bdd43161d0e73e7bee95d103ed1.tar.xz
leds: gpio: Annotate struct gpio_leds_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 gpio_leds_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> Link: https://lore.kernel.org/r/20230915201003.never.148-kees@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds/leds-lm3697.c')
0 files changed, 0 insertions, 0 deletions