Re: [PATCH] xfrm: Annotate struct xfrm_sec_ctx with __counted_by

2023-10-05 Thread Steffen Klassert
On Tue, Oct 03, 2023 at 04:18:28PM -0700, Kees Cook wrote: > 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)

Re: [PATCH] xfrm: Annotate struct xfrm_sec_ctx with __counted_by

2023-10-03 Thread Gustavo A. R. Silva
On 10/4/23 01:18, Kees Cook wrote: 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

[PATCH] xfrm: Annotate struct xfrm_sec_ctx with __counted_by

2023-10-03 Thread Kees Cook
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). A