[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4i_nHzV155RcgnAQ189aq2Lfd2g8pA1D5NbZqo9E_u+Dw@mail.gmail.com>
Date: Tue, 30 Jul 2019 13:14:52 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
linux-iio@...r.kernel.org, Daniel Vetter <daniel.vetter@...ll.ch>,
linux-pci@...r.kernel.org, linux-nvme@...ts.infradead.org,
Bjorn Andersson <bjorn.andersson@...aro.org>,
sparclinux@...r.kernel.org,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
linux-scsi <linux-scsi@...r.kernel.org>,
linux-nvdimm <linux-nvdimm@...ts.01.org>,
linux-rdma <linux-rdma@...r.kernel.org>, qat-linux@...el.com,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
Jason Gunthorpe <jgg@...lanox.com>,
linux-input@...r.kernel.org, Darren Hart <dvhart@...radead.org>,
"Linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
linux-remoteproc@...r.kernel.org,
"moderated list:DMA BUFFER SHARING FRAMEWORK"
<linaro-mm-sig@...ts.linaro.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
David Sterba <dsterba@...e.com>,
platform-driver-x86@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
USB list <linux-usb@...r.kernel.org>,
Linux Wireless List <linux-wireless@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
tee-dev@...ts.linaro.org,
linux-crypto <linux-crypto@...r.kernel.org>,
Netdev <netdev@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-btrfs@...r.kernel.org
Subject: Re: [PATCH v5 13/29] compat_ioctl: move more drivers to compat_ptr_ioctl
On Tue, Jul 30, 2019 at 12:59 PM Arnd Bergmann <arnd@...db.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@...lanox.com>
> Acked-by: Daniel Vetter <daniel.vetter@...ll.ch>
> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
> Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Acked-by: David Sterba <dsterba@...e.com>
> Acked-by: Darren Hart (VMware) <dvhart@...radead.org>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> Acked-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> Signed-off-by: Arnd Bergmann <arnd@...db.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@...el.com>
Powered by blists - more mailing lists