Message ID | 20190816063547.1592-3-hch@lst.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] xfs: fall back to native ioctls for unhandled compat ones | expand |
On 8/16/19 1:35 AM, Christoph Hellwig wrote: > For 31-bit s390 user space, we have to pass pointer arguments through > compat_ptr() in the compat_ioctl handler. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > Signed-off-by: Christoph Hellwig <hch@lst.de> Seems fine Reviewed-by: Eric Sandeen <sandeen@redhat.com> > --- > fs/xfs/xfs_ioctl32.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c > index bae08ef92ac3..7bd7534f5051 100644 > --- a/fs/xfs/xfs_ioctl32.c > +++ b/fs/xfs/xfs_ioctl32.c > @@ -547,7 +547,7 @@ xfs_file_compat_ioctl( > struct inode *inode = file_inode(filp); > struct xfs_inode *ip = XFS_I(inode); > struct xfs_mount *mp = ip->i_mount; > - void __user *arg = (void __user *)p; > + void __user *arg = compat_ptr(p); > int error; > > trace_xfs_file_compat_ioctl(ip); > @@ -655,6 +655,6 @@ xfs_file_compat_ioctl( > return xfs_compat_fssetdm_by_handle(filp, arg); > default: > /* try the native version */ > - return xfs_file_ioctl(filp, cmd, p); > + return xfs_file_ioctl(filp, cmd, (unsigned long)arg); > } > } >
On Fri, Aug 16, 2019 at 08:35:47AM +0200, Christoph Hellwig wrote: > For 31-bit s390 user space, we have to pass pointer arguments through > compat_ptr() in the compat_ioctl handler. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > Signed-off-by: Christoph Hellwig <hch@lst.de> Looks ok, Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> --D > --- > fs/xfs/xfs_ioctl32.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c > index bae08ef92ac3..7bd7534f5051 100644 > --- a/fs/xfs/xfs_ioctl32.c > +++ b/fs/xfs/xfs_ioctl32.c > @@ -547,7 +547,7 @@ xfs_file_compat_ioctl( > struct inode *inode = file_inode(filp); > struct xfs_inode *ip = XFS_I(inode); > struct xfs_mount *mp = ip->i_mount; > - void __user *arg = (void __user *)p; > + void __user *arg = compat_ptr(p); > int error; > > trace_xfs_file_compat_ioctl(ip); > @@ -655,6 +655,6 @@ xfs_file_compat_ioctl( > return xfs_compat_fssetdm_by_handle(filp, arg); > default: > /* try the native version */ > - return xfs_file_ioctl(filp, cmd, p); > + return xfs_file_ioctl(filp, cmd, (unsigned long)arg); > } > } > -- > 2.20.1 >
On Fri, Aug 16, 2019 at 06:42:18PM -0700, Darrick J. Wong wrote: > On Fri, Aug 16, 2019 at 08:35:47AM +0200, Christoph Hellwig wrote: > > For 31-bit s390 user space, we have to pass pointer arguments through > > compat_ptr() in the compat_ioctl handler. > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > Looks ok, > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> So, what is the plan? Do you think they are worth including for 5.3, or do you want to pass them off to Arnd for his series that is targeted at 5.4?
On Sun, Aug 18, 2019 at 01:35:53AM -0700, Christoph Hellwig wrote: > On Fri, Aug 16, 2019 at 06:42:18PM -0700, Darrick J. Wong wrote: > > On Fri, Aug 16, 2019 at 08:35:47AM +0200, Christoph Hellwig wrote: > > > For 31-bit s390 user space, we have to pass pointer arguments through > > > compat_ptr() in the compat_ioctl handler. > > > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > > > Looks ok, > > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> > > So, what is the plan? Do you think they are worth including for 5.3, > or do you want to pass them off to Arnd for his series that is targeted > at 5.4? I'll combine these two with the reflink/dedupe locking fixes and push all four out this week. --D
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c index bae08ef92ac3..7bd7534f5051 100644 --- a/fs/xfs/xfs_ioctl32.c +++ b/fs/xfs/xfs_ioctl32.c @@ -547,7 +547,7 @@ xfs_file_compat_ioctl( struct inode *inode = file_inode(filp); struct xfs_inode *ip = XFS_I(inode); struct xfs_mount *mp = ip->i_mount; - void __user *arg = (void __user *)p; + void __user *arg = compat_ptr(p); int error; trace_xfs_file_compat_ioctl(ip); @@ -655,6 +655,6 @@ xfs_file_compat_ioctl( return xfs_compat_fssetdm_by_handle(filp, arg); default: /* try the native version */ - return xfs_file_ioctl(filp, cmd, p); + return xfs_file_ioctl(filp, cmd, (unsigned long)arg); } }