firewire: Annotate struct fw_iso_packet with __counted_by()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 26 Mar 2024 01:56:10 +0000 (19:56 -0600)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 6 May 2024 02:06:04 +0000 (11:06 +0900)
commitd3155742db89df3b3c96da383c400e6ff4d23c25
treeb51214645e900e6eb7273bd04901fda9890cc6c8
parentf83a052f9a0b62318d4f6e9bdddf9fc0103ac908
firewire: Annotate struct fw_iso_packet 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 via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/ZgIrOuR3JI/jzqoH@neat
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
include/linux/firewire.h