lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdUKMoaEoA=aiMUYYd22fqKv2UdVtGMG1JCE-3gtTPvz_A@mail.gmail.com>
Date: Fri, 19 Dec 2025 09:43:38 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Andreas Dilger <adilger@...ger.ca>, Jan Kara <jack@...e.cz>, Arnd Bergmann <arnd@...nel.org>, 
	"Theodore Ts'o" <tytso@....edu>, "Darrick J. Wong" <djwong@...nel.org>, linux-ext4@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext4: fix ext4_tune_sb_params padding

On Fri, 5 Dec 2025 at 19:07, Arnd Bergmann <arnd@...db.de> wrote:
> On Fri, Dec 5, 2025, at 11:17, Andreas Dilger wrote:
> >> On Dec 4, 2025, at 3:31 AM, Jan Kara <jack@...e.cz> wrote:
> >> On Thu 04-12-25 11:19:10, Arnd Bergmann wrote:
> > While this change isn't _wrong_ per-se, it does seem very strange to have
> > a 68-byte padding at the end of the struct.  You have to check the number
> > of __u32 fields closely to see this,
>
> I had the same thought but decided against that because it would be
> an ABI break on all architectures. The version I posted only changes
> the structure size on x86-32, csky, m68k and microblaze, as far
> as I can tell.

Indeed very unfortunate...

> > and I wonder if this will perpetuate
> > errors in the future (e.g. adding a __u64 field after mount_opts[64]).
>
> Indeed, I can see how that could become worse.
>
> > IMHO, it would be more clear to either add an explicit "__u32 pad_3;"
> > field after mount_opts[64], or alternately declare mount_opts[68] so it

FTR, I would have added "__u32 pad_3;" _before_ mount_opts[64].

> > will consume those bytes and leave the remaining fields properly aligned.
> > It isn't critical if the user tools use the last 4 bytes of mount_opts[]
> > or not, so they could be changed independently at some later time.
> >
> > Either will ensure that new fields added in place of pad[64] will be
> > properly aligned in the future.
>
> Changing mount_opts[] to 68 bytes sounds fine to me, I'll send an
> updated patch for that. I've kept the Ack from Jan, please shout
> if I should drop that instead.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ