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] [thread-next>] [day] [month] [year] [list]
Message-ID: <41ea75676ea983281368c449647599aad9551d1b.camel@wdc.com>
Date: Mon, 9 Feb 2026 07:04:22 +0000
From: Wilfred Mallawa <wilfred.mallawa@....com>
To: hch <hch@....de>
CC: "djwong@...nel.org" <djwong@...nel.org>, "linux-xfs@...r.kernel.org"
	<linux-xfs@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "cem@...nel.org" <cem@...nel.org>
Subject: Re: [PATCH] xfs: add static size checks for structures in xfs_fs.h

On Fri, 2026-02-06 at 07:08 +0100, Christoph Hellwig wrote:
> On Fri, Feb 06, 2026 at 01:05:58PM +1000, Wilfred Mallawa wrote:
> > From: Wilfred Mallawa <wilfred.mallawa@....com>
> > 
> > This patch adds static size checks for the structures in
> > libxfs/xfs_fs.h.
> 
> That's very useful, as adding new fields can mess them up, thanks!
> 
> Nit on the commit message: "This patch ..." is redundant and get some
> maintainers enraged. 

Ha thanks for the heads up! will keep that in mind.

> Maybe also amend this blurb to mention why we want
> the size checks:
> 
> Add static size checks for the ioctl UAPI structures in
> libxfs/xfs_fs.h..
> 
> > The structures with architecture dependent size for
> > fields are ommited from this patch (such as xfs_bstat which depends
> > on
> > __kernel_long_t).
> 
> Good point.  Maybe also add this as a commen in the code?

As Dave mentioned, I did not consider the alignment requirements being
different on 32b for example. So I did see some errors for the
following structs from testbot:


xfs_flock64
xfs_fsop_geom_v1
xfs_growfs_data_t
xfs_growfs_rt_t
xfs_inogrp

So we may have to omit these altogether? I'm not sure if this patch
would cause issues for other configs the testbot isn't catching? Any
thoughts?

> 
> > Also remove some existing duplicate entries of
> > XFS_CHECK_STRUCT_SIZE().
> 
> Oh, good on.  This should probably be split into a separate
> patch.  I'd also keep the first occurrence and remove those under
> the "/* ondisk dir/attr structures from xfs/122 */" label.

Okay that sounds good!

Regards,
Wilfred


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ