Re: [PATCH 3/3] UAPI: ethtool: Avoid flex-array in struct ethtool_link_settings

2024-11-15 Thread Jakub Kicinski
On Fri, 15 Nov 2024 12:43:05 -0800 Kees Cook wrote: > struct ethtool_link_settings tends to be used as a header for other > structures that have trailing bytes[1], but has a trailing flexible array > itself. Using this overlapped with other structures leads to ambiguous > object sizing in the compi

[PATCH 3/3] UAPI: ethtool: Avoid flex-array in struct ethtool_link_settings

2024-11-15 Thread Kees Cook
struct ethtool_link_settings tends to be used as a header for other structures that have trailing bytes[1], but has a trailing flexible array itself. Using this overlapped with other structures leads to ambiguous object sizing in the compiler, so we want to avoid such situations (which have caused