Input: ims-pcu - annotate struct ims_pcu_flash_fmt with __counted_by
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Wed, 19 Jun 2024 21:13:21 +0000 (23:13 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 20 Jun 2024 15:45:12 +0000 (08:45 -0700)
commite8135f9dc774f956bca44a13cf056403140e2337
treed7effb5dbde9e55ffa46cc88720d882d55afbb82
parent9b9247397e2e20016031e59f76dae563b79b6ee2
Input: ims-pcu - annotate struct ims_pcu_flash_fmt with __counted_by

Use the __counted_by compiler attribute for the data[] flexible array
member to improve the results of array bound sanitizers.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240619-ims-pcu-counted_by-v1-1-3ee0ead2e57d@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/ims-pcu.c