Re: [PATCH v2] greybus: Avoid fake flexible array for response data

2024-03-04 Thread Kees Cook
On Mon, Mar 04, 2024 at 04:45:11PM -0600, Alex Elder wrote: > On 3/4/24 3:19 PM, Kees Cook wrote: > > FORTIFY_SOURCE has been ignoring 0-sized destinations while the kernel > > code base has been converted to flexible arrays. In order to enforce > > the 0-sized destinations (e.g. with __counted_by)

Re: [PATCH v2] greybus: Avoid fake flexible array for response data

2024-03-04 Thread Alex Elder
On 3/4/24 3:19 PM, Kees Cook wrote: FORTIFY_SOURCE has been ignoring 0-sized destinations while the kernel code base has been converted to flexible arrays. In order to enforce the 0-sized destinations (e.g. with __counted_by), the remaining 0-sized destinations need to be handled. Instead of conv

[PATCH v2] greybus: Avoid fake flexible array for response data

2024-03-04 Thread Kees Cook
FORTIFY_SOURCE has been ignoring 0-sized destinations while the kernel code base has been converted to flexible arrays. In order to enforce the 0-sized destinations (e.g. with __counted_by), the remaining 0-sized destinations need to be handled. Instead of converting an empty struct into using a fl