From: Kees Cook <[email protected]> Date: Fri, 30 May 2025 12:13:16 -0700
> While not yet in the tree, there is a proposed patch[1] that was > depending on the prior behavior of _DEFINE_FLEX, which did not have an > explicit initializer. Provide this via __DEFINE_FLEX now, which can also > have attributes applied (e.g. __uninitialized). > > Examples of the resulting initializer behaviors can be seen here: > https://godbolt.org/z/P7Go8Tr33 > > Link: > https://lore.kernel.org/netdev/[email protected] > [1] > Fixes: 47e36ed78406 ("overflow: Fix direct struct member initialization in > _DEFINE_FLEX()") > Signed-off-by: Kees Cook <[email protected]> Looks great to me, thanks! Also, double thanks for this hint about using __uninitialized to mitigate perf hits with automatic stack initialization -- will definitely help :) Olek
