Re: [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-04-20 Thread Andrew Donnellan
On Fri, 2023-01-27 at 07:10 -0600, Nathan Lynch wrote: > > > > I see at least one place that consults the size of one of these > > > > structs, > > > > in get_pseries_errorlog(): > > > > > > > > /* Check that we understand the format */ > > > > if (ext_log_length < sizeof(struct >

Re: [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-01-27 Thread Kees Cook
On Fri, Jan 27, 2023 at 07:10:28AM -0600, Nathan Lynch wrote: > Andrew Donnellan writes: > > Using a one-element array as a fake flexible array is deprecated. > > > > Replace the one-element flexible arrays in rtas-types.h with C99 standard > > flexible array members instead. > > > > This helps

Re: [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-01-27 Thread Nathan Lynch
Andrew Donnellan writes: > Using a one-element array as a fake flexible array is deprecated. > > Replace the one-element flexible arrays in rtas-types.h with C99 standard > flexible array members instead. > > This helps us move towards enabling -fstrict-flex-arrays=3 in future. > > Found using

Re: [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-01-27 Thread Leonardo BrĂ¡s
On Fri, 2023-01-27 at 19:50 +1100, Andrew Donnellan wrote: > Using a one-element array as a fake flexible array is deprecated. > > Replace the one-element flexible arrays in rtas-types.h with C99 standard > flexible array members instead. > > This helps us move towards enabling

[PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-01-27 Thread Andrew Donnellan
Using a one-element array as a fake flexible array is deprecated. Replace the one-element flexible arrays in rtas-types.h with C99 standard flexible array members instead. This helps us move towards enabling -fstrict-flex-arrays=3 in future. Found using