1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/arch/x86/platform/uv
Kees Cook d9a01959d9 x86/platform/uv: Annotate struct uv_rtc_timer_head 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 checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

Found with Coccinelle:

  https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Add __counted_by for struct uv_rtc_timer_head.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230922175151.work.118-kees@kernel.org
2023-09-24 12:02:58 +02:00
..
bios_uv.c x86/platform/uv: Add and export uv_bios_* functions 2020-11-26 12:50:44 +01:00
Makefile x86/platform/uv: Remove existing /sys/firmware/sgi_uv/ interface 2020-11-26 12:08:17 +01:00
uv_irq.c x86/vector: Rename send_cleanup_vector() to vector_schedule_cleanup() 2023-08-06 14:15:09 +02:00
uv_nmi.c x86/platform/uv: Rework NMI "action" modparam handling 2023-09-17 09:52:51 +02:00
uv_time.c x86/platform/uv: Annotate struct uv_rtc_timer_head with __counted_by 2023-09-24 12:02:58 +02:00