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

2024-02-18 Thread Alex Elder
On 2/17/24 3:58 PM, Kees Cook wrote: On Sat, Feb 17, 2024 at 02:17:33PM -0600, Alex Elder wrote: On 2/16/24 5:28 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 destinati

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

2024-02-17 Thread Kees Cook
On Sat, Feb 17, 2024 at 02:17:33PM -0600, Alex Elder wrote: > On 2/16/24 5:28 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] greybus: Avoid fake flexible array for response data

2024-02-17 Thread Alex Elder
On 2/16/24 5:28 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 con

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

2024-02-16 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