[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190425153534.GS2217@ZenIV.linux.org.uk>
Date: Thu, 25 Apr 2019 16:35:34 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-fsdevel@...r.kernel.org,
y2038@...ts.linaro.org, linux-kernel@...r.kernel.org,
Jason Gunthorpe <jgg@...lanox.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
David Sterba <dsterba@...e.com>,
Darren Hart <dvhart@...radead.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
devel@...verdev.osuosl.org, qat-linux@...el.com,
linux-crypto@...r.kernel.org, linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
amd-gfx@...ts.freedesktop.org, linux-input@...r.kernel.org,
linux-iio@...r.kernel.org, linux-rdma@...r.kernel.org,
linux-nvdimm@...ts.01.org, linux-nvme@...ts.infradead.org,
linux-pci@...r.kernel.org, platform-driver-x86@...r.kernel.org,
linux-remoteproc@...r.kernel.org, sparclinux@...r.kernel.org,
linux-scsi@...r.kernel.org, linux-usb@...r.kernel.org,
linux-btrfs@...r.kernel.org, ceph-devel@...r.kernel.org,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
Sean Young <sean@...s.org>
Subject: Re: [PATCH v3 12/26] compat_ioctl: move more drivers to
compat_ptr_ioctl
On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote:
> If I understand your patch description well, using compat_ptr_ioctl
> only works if the driver is not for s390, right?
No; s390 is where "oh, just set ->compat_ioctl same as ->unlocked_ioctl
and be done with that; compat_ptr() is a no-op anyway" breaks. IOW,
s390 is the reason for having compat_ptr_ioctl() in the first place;
that thing works on all biarch architectures, as long as all stuff
handled by ->ioctl() takes pointer to arch-independent object as
argument. IOW,
argument ignored => OK
any arithmetical type => no go, compat_ptr() would bugger it
pointer to int => OK
pointer to string => OK
pointer to u64 => OK
pointer to struct {u64 addr; char s[11];} => OK
pointer to long => needs explicit handler
pointer to struct {void *addr; char s[11];} => needs explicit handler
pointer to struct {int x; u64 y;} => needs explicit handler on amd64
For "just use ->unlocked_ioctl for ->ioctl" we have
argument ignored => OK
any arithmetical type => OK
any pointer => instant breakage on s390, in addtion to cases that break
with compat_ptr_ioctl().
Probably some form of that ought to go into commit message for compat_ptr_ioctl()
introduction...
Powered by blists - more mailing lists