Re: [PATCH] kunit/overflow: Adjust for __counted_by with DEFINE_RAW_FLEX()

2024-06-10 Thread Christian Schrefl
On 10.06.24 8:23 PM, Kees Cook wrote: > When a flexible array structure has a __counted_by annotation, its use > with DEFINE_RAW_FLEX() will result in the count being zero-initialized. > This is expected since one doesn't want to use RAW with a counted_by > struct. Adjust the tests to check for t

Re: [PATCH] kunit/overflow: Adjust for __counted_by with DEFINE_RAW_FLEX()

2024-06-10 Thread Nathan Chancellor
On Mon, Jun 10, 2024 at 11:23:05AM -0700, Kees Cook wrote: > When a flexible array structure has a __counted_by annotation, its use > with DEFINE_RAW_FLEX() will result in the count being zero-initialized. > This is expected since one doesn't want to use RAW with a counted_by > struct. Adjust the t

[PATCH] kunit/overflow: Adjust for __counted_by with DEFINE_RAW_FLEX()

2024-06-10 Thread Kees Cook
When a flexible array structure has a __counted_by annotation, its use with DEFINE_RAW_FLEX() will result in the count being zero-initialized. This is expected since one doesn't want to use RAW with a counted_by struct. Adjust the tests to check for the condition and for compiler support. Reported