linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-iio@vger.kernel.org, Daniel Vetter <daniel.vetter@ffwll.ch>,
	linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	sparclinux@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-nvdimm <linux-nvdimm@lists.01.org>,
	linux-rdma <linux-rdma@vger.kernel.org>,
	qat-linux@intel.com, amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Jason Gunthorpe <jgg@mellanox.com>,
	linux-input@vger.kernel.org, Darren Hart <dvhart@infradead.org>,
	"Linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	linux-remoteproc@vger.kernel.org,
	"moderated list:DMA BUFFER SHARING FRAMEWORK" 
	<linaro-mm-sig@lists.linaro.org>,
	Maling list - DRI developers  <dri-devel@lists.freedesktop.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	David Sterba <dsterba@suse.com>,
	platform-driver-x86@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	USB list <linux-usb@vger.kernel.org>,
	Linux Wireless List <linux-wireless@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	tee-dev@lists.linaro.org,
	linux-crypto <linux-crypto@vger.kernel.org>,
	Netdev <netdev@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v5 13/29] compat_ioctl: move more drivers to compat_ptr_ioctl
Date: Tue, 30 Jul 2019 13:14:52 -0700	[thread overview]
Message-ID: <CAPcyv4i_nHzV155RcgnAQ189aq2Lfd2g8pA1D5NbZqo9E_u+Dw@mail.gmail.com> (raw)
In-Reply-To: <20190730195819.901457-1-arnd@arndb.de>

On Tue, Jul 30, 2019 at 12:59 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> The .ioctl and .compat_ioctl file operations have the same prototype so
> they can both point to the same function, which works great almost all
> the time when all the commands are compatible.
>
> One exception is the s390 architecture, where a compat pointer is only
> 31 bit wide, and converting it into a 64-bit pointer requires calling
> compat_ptr(). Most drivers here will never run in s390, but since we now
> have a generic helper for it, it's easy enough to use it consistently.
>
> I double-checked all these drivers to ensure that all ioctl arguments
> are used as pointers or are ignored, but are not interpreted as integer
> values.
>
> Acked-by: Jason Gunthorpe <jgg@mellanox.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Acked-by: David Sterba <dsterba@suse.com>
> Acked-by: Darren Hart (VMware) <dvhart@infradead.org>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/nvdimm/bus.c                        | 4 ++--
[..]
> diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
> index 798c5c4aea9c..6ca142d833ab 100644
> --- a/drivers/nvdimm/bus.c
> +++ b/drivers/nvdimm/bus.c
> @@ -1229,7 +1229,7 @@ static const struct file_operations nvdimm_bus_fops = {
>         .owner = THIS_MODULE,
>         .open = nd_open,
>         .unlocked_ioctl = bus_ioctl,
> -       .compat_ioctl = bus_ioctl,
> +       .compat_ioctl = compat_ptr_ioctl,
>         .llseek = noop_llseek,
>  };
>
> @@ -1237,7 +1237,7 @@ static const struct file_operations nvdimm_fops = {
>         .owner = THIS_MODULE,
>         .open = nd_open,
>         .unlocked_ioctl = dimm_ioctl,
> -       .compat_ioctl = dimm_ioctl,
> +       .compat_ioctl = compat_ptr_ioctl,
>         .llseek = noop_llseek,
>  };

Acked-by: Dan Williams <dan.j.williams@intel.com>

  parent reply	other threads:[~2019-07-30 20:15 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 19:25 [PATCH v5 00/29] compat_ioctl.c removal, part 1/3 Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 01/29] fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 02/29] FIGETBSZ: fix compat Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 03/29] compat: itanic doesn't have one Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 04/29] do_vfs_ioctl(): use saner types Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 05/29] compat: move FS_IOC_RESVSP_32 handling to fs/ioctl.c Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 06/29] compat_sys_ioctl(): make parallel to do_vfs_ioctl() Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 07/29] ceph: fix compat_ioctl for ceph_dir_operations Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 08/29] compat_ioctl: drop FIOQSIZE table entry Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 09/29] compat_ioctl: pppoe: fix PPPOEIOCSFWD handling Arnd Bergmann
2019-07-30 21:42   ` David Miller
2019-07-30 19:25 ` [PATCH v5 10/29] compat_ioctl: add compat_ptr_ioctl() Arnd Bergmann
2019-07-30 19:25 ` [PATCH v5 11/29] compat_ioctl: move rtc handling into rtc-dev.c Arnd Bergmann
2019-07-30 19:50 ` [PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl Arnd Bergmann
2019-07-30 21:43   ` David Miller
2019-07-31  8:37   ` Cornelia Huck
2019-07-30 19:55 ` [PATCH v5 13/29] compat_ioctl: move more " Arnd Bergmann
2019-07-30 19:55   ` [PATCH v5 14/29] compat_ioctl: use correct compat_ptr() translation in drivers Arnd Bergmann
2019-07-30 19:55   ` [PATCH v5 15/29] compat_ioctl: move tape handling into drivers Arnd Bergmann
2019-07-31 10:50     ` Heiko Carstens
2019-07-31 15:47       ` Arnd Bergmann
2019-07-30 19:55   ` [PATCH v5 16/29] compat_ioctl: move ATYFB_CLK handling to atyfb driver Arnd Bergmann
2019-07-30 19:55   ` [PATCH v5 17/29] compat_ioctl: move isdn/capi ioctl translation into driver Arnd Bergmann
2019-07-30 19:55   ` [PATCH v5 18/29] compat_ioctl: move rfcomm handlers " Arnd Bergmann
2019-08-12 16:29     ` Marcel Holtmann
2019-07-30 19:55   ` [PATCH v5 19/29] compat_ioctl: move hci_sock " Arnd Bergmann
2019-08-12 16:29     ` Marcel Holtmann
2019-07-30 20:14   ` Dan Williams [this message]
2019-07-30 20:01 ` [PATCH v5 20/29] compat_ioctl: remove HCIUART handling Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 21/29] compat_ioctl: remove HIDIO translation Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 22/29] compat_ioctl: remove translation for sound ioctls Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 23/29] compat_ioctl: remove IGNORE_IOCTL() Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 24/29] compat_ioctl: remove /dev/random commands Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 25/29] compat_ioctl: remove joystick ioctl translation Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 26/29] compat_ioctl: remove PCI " Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 27/29] compat_ioctl: remove /dev/raw " Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 28/29] compat_ioctl: remove last RAID handling code Arnd Bergmann
2019-07-30 20:01   ` [PATCH v5 29/29] compat_ioctl: remove unused convert_in_user macro Arnd Bergmann

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=CAPcyv4i_nHzV155RcgnAQ189aq2Lfd2g8pA1D5NbZqo9E_u+Dw@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dsterba@suse.com \
    --cc=dvhart@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgg@mellanox.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=qat-linux@intel.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=tee-dev@lists.linaro.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).