summaryrefslogtreecommitdiff
path: root/fs/qnx6
diff options
context:
space:
mode:
authorNick Bowler <nbowler@draconx.ca>2018-12-17 09:35:27 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 15:37:33 +0100
commit1cc7f4c628d92275572683219ea5e34580bd83bd (patch)
tree6b353e8fd498c919742f2968ddb92ed309ec4297 /fs/qnx6
parent05ec56052bb9f14986b3ff0b05518f2a91874c0f (diff)
xfs: Fix bulkstat compat ioctls on x32 userspace.
[ Upstream commit 7ca860e3c1a74ad6bd8949364073ef1044cad758 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/qnx6')
0 files changed, 0 insertions, 0 deletions