Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: cs-amp-lib: Annotate struct cirrus_amp_efi_data with __counted_by()

Add the __counted_by() compiler attribute to the flexible array member
'data' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250415090354.92211-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Thorsten Blum and committed by
Mark Brown
fcdf212f 46e7ea05

+1 -1
+1 -1
include/sound/cs-amp-lib.h
··· 23 23 struct cirrus_amp_efi_data { 24 24 u32 size; 25 25 u32 count; 26 - struct cirrus_amp_cal_data data[]; 26 + struct cirrus_amp_cal_data data[] __counted_by(count); 27 27 } __packed; 28 28 29 29 /**