* [PATCH] x86/setup: Annotate pci_setup_rom::romdata with __counted_by()
@ 2026-09-18 12:08 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-09-18 12:08 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, Kees Cook, Gustavo A. R. Silva
Cc: Thorsten Blum, linux-kernel, linux-hardening
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 <blum@kernel.org>
---
arch/x86/include/asm/setup_data.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/setup_data.h b/arch/x86/include/asm/setup_data.h
index 7bb16f843c93..36ca725182f9 100644
--- a/arch/x86/include/asm/setup_data.h
+++ b/arch/x86/include/asm/setup_data.h
@@ -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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-18 12:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18 12:08 [PATCH] x86/setup: Annotate pci_setup_rom::romdata with __counted_by() Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®