Re: [PATCH] btrfs: fix send ioctl on 32bit with 64bit kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 27, 2017 at 12:52:50PM +0200, David Sterba wrote:
> On Tue, Sep 26, 2017 at 04:40:09PM -0400, Josef Bacik wrote:
> > We pass in a pointer in our send arg struct, this means the struct size doesn't
> > match with 32bit user space and 64bit kernel space.  Fix this by adding a compat
> > mode and doing the appropriate conversion.
> 
> How does this differ from the existing workaround that adds the 32bit
> structure (btrfs_ioctl_timespec_32 and
> btrfs_ioctl_received_subvol_args_32 at the top of ioctl.c) and the
> btrfs_compat_ioctl() (at the end of ioctl.c)?

This is different because it's for SEND not RECIEVED_SUBVOL.  We have a pointer
in the send args struct which is differently sized on 64bit from 32bit, so we
need the compat struct so it's the right size when it comes into the kernel, and
then we translate from there.  Without this send is broken with 32bit userspace
and a 64bit kernel.  Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux