x86/setup: Annotate pci_setup_rom::romdata with __counted_by()
PATCH 1/1 x86/setup: Annotate pci_setup_rom::romdata with __counted_by()
Add __counted_by() to pci_setup_rom::romdata to enable access bounds checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE.
Signed-off-by Thorsten Blum <[email protected]>
--- arch/x86/include/asm/setup_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/setup_data.h +1 -1
@@ -15,7 +15,7 @@ struct pci_setup_rom {unsigned long bus;unsigned long device;unsigned long function; -uint8_t romdata[]; + uint8_t romdata[] __counted_by(pcilen); };/* kexec external ABI */