Re: [RFC PATCH xfstests] xfs: add tests to validate ioctl structure layout.

Luis Chamberlain
2019-01-15T15:56:02Z

On Thu, Dec 13, 2018 at 10:40:53PM -0500, Nick Bowler wrote:
> Introduce two new test cases. The first one greps xfs_fs.h to find
> any structure types possibly relevant to ioctls, then compares the
> structure layouts between 64-bit and 32-bit objects. The goal is to
> ensure that any _new_ structure has the same characteristics on 32-bit
> versus 64-bit mode, ensuring a sane compat handler. This requires a
> toolchain that can build both 64-bit and 32-bit objects, and hopefully
> works on non-x86 platforms with compat woes.
>
> The whitelist was constructed by manually inspecting the current
> compat ioctl implementation. The test validates that everything
> in the whitelist actually got found by the grepping as a sort of
> self-sanity check, but if older versions lacked some of these
> types then this might need tweaking a bit.
>
> The second test validates that a well-known set of structures on x32
> crrectly match the ia32 or amd64 layouts as expected. This requires
> a toolchain that can build for all three ABIs.
>
> The idea is that new additions to the header where the structures
> differ in 32 and 64-bit x86 will be caught by the first test case
> and that will be sufficient to detect potential x32 problems too.
>
> Signed-off-by: Nick Bowler <nbowler@draconx.ca>

I believe this effort was dropped. Respin?

Luis