Re: [PATCH] ext4: fix ext4_tune_sb_params padding
From: Arnd Bergmann
Date: Thu Dec 04 2025 - 08:42:28 EST
On Thu, Dec 4, 2025, at 13:35, David Laight wrote:
> On Thu, 4 Dec 2025 11:19:10 +0100
> Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
>> From: Arnd Bergmann <arnd@xxxxxxxx>
>>
>> The padding at the end of struct ext4_tune_sb_params is architecture
>> specific and in particular is different between x86-32 and x86-64,
>> since the __u64 member only enforces struct alignment on the latter.
>
> Is it worth adding a compile-time check for the size somewhere?
> Since the intention seems to be that any extensions will use the padding.
There is already ABI checking with abigail that ensures that struct
members and sizes don't change in the future, which I think covers
that. I would also like to push my series to enable -Werror=padded
in the header checks, but I'm not sure yet what others think of the
idea.
Arnd