From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Eric Sandeen <sandeen@sandeen.net>
Subject: Re: [PATCH 2/2] xfs: compat_ioctl: use compat_ptr()
Date: Fri, 16 Aug 2019 18:42:18 -0700 [thread overview]
Message-ID: <20190817014218.GD752159@magnolia> (raw)
In-Reply-To: <20190816063547.1592-3-hch@lst.de>
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
>
next prev parent reply other threads:[~2019-08-17 1:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 6:35 xfs compat ioctls fixlets Christoph Hellwig
2019-08-16 6:35 ` [PATCH 1/2] xfs: fall back to native ioctls for unhandled compat ones Christoph Hellwig
2019-08-16 13:51 ` Eric Sandeen
2019-08-17 1:42 ` Darrick J. Wong
2019-08-16 6:35 ` [PATCH 2/2] xfs: compat_ioctl: use compat_ptr() Christoph Hellwig
2019-08-16 14:05 ` Eric Sandeen
2019-08-17 1:42 ` Darrick J. Wong [this message]
2019-08-18 8:35 ` Christoph Hellwig
2019-08-19 16:42 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190817014218.GD752159@magnolia \
--to=darrick.wong@oracle.com \
--cc=arnd@arndb.de \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox