diff options
| author | Nick Bowler <nbowler@draconx.ca> | 2018-12-17 20:35:27 +0300 | 
|---|---|---|
| committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-12-18 21:55:20 +0300 | 
| commit | 7ca860e3c1a74ad6bd8949364073ef1044cad758 (patch) | |
| tree | 1ca973be589423b562b186c0c3cb97e777d75df3 /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | c456d64449efe37da50832b63d91652a85ea1d20 (diff) | |
| download | linux-7ca860e3c1a74ad6bd8949364073ef1044cad758.tar.xz | |
xfs: Fix bulkstat compat ioctls on x32 userspace.
The bulkstat family of ioctls are problematic on x32, because there is
a mixup of native 32-bit and 64-bit conventions.  The xfs_fsop_bulkreq
struct contains pointers and 32-bit integers so that matches the native
32-bit layout, and that means the ioctl implementation goes into the
regular compat path on x32.
However, the 'ubuffer' member of that struct in turn refers to either
struct xfs_inogrp or xfs_bstat (or an array of these).  On x32, those
structures match the native 64-bit layout.  The compat implementation
writes out the 32-bit version of these structures.  This is not the
expected format for x32 userspace, causing problems.
Fortunately the functions which actually output these xfs_inogrp and
xfs_bstat structures have an easy way to select which output format
is required, so we just need a little tweak to select the right format
on x32.
Signed-off-by: Nick Bowler <nbowler@draconx.ca>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions
