From: Mauro Carvalho Chehab <mchehab+samsung@kernel•org>
To: Al Viro <viro@zeniv•linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb•de>,
linux-fsdevel@vger•kernel.org, y2038@lists•linaro.org,
linux-kernel@vger•kernel.org, Jason Gunthorpe <jgg@mellanox•com>,
Daniel Vetter <daniel.vetter@ffwll•ch>,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
David Sterba <dsterba@suse•com>,
Darren Hart <dvhart@infradead•org>,
Jonathan Cameron <Jonathan.Cameron@huawei•com>,
Bjorn Andersson <bjorn.andersson@linaro•org>,
devel@driverdev•osuosl.org, qat-linux@intel•com,
linux-crypto@vger•kernel.org, linux-media@vger•kernel.org,
dri-devel@lists•freedesktop.org, linaro-mm-sig@lists•linaro.org,
amd-gfx@lists•freedesktop.org, linux-input@vger•kernel.org,
linux-iio@vger•kernel.org, linux-rdma@vger•kernel.org,
linux-nvdimm@lists•01.org, linux-nvme@lists•infradead.org,
linux-pci@vger•kernel.org, platform-driver-x86@vger•kernel.org,
linux-remoteproc@vger•kernel.org, sparclinux@vger•kernel.org,
linux-scsi@vger•kernel.org, linux-usb@vger•kernel.org,
linux-btrfs@vger•kernel.org, ceph-devel@vger•kernel.org,
linux-wireless@vger•kernel.org, netdev@vger•kernel.org,
Sean Young <sean@mess•org>
Subject: Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl
Date: Thu, 25 Apr 2019 12:53:01 -0300 [thread overview]
Message-ID: <20190425125301.5165cf15@coco.lan> (raw)
In-Reply-To: <20190425153534.GS2217@ZenIV.linux.org.uk>
Em Thu, 25 Apr 2019 16:35:34 +0100
Al Viro <viro@zeniv•linux.org.uk> escreveu:
> 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
That's the case for all LIRC ioctls: they all use a pointer to u32
argument.
> 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...
Agreed.
Thanks,
Mauro
next prev parent reply other threads:[~2019-04-25 15:53 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 20:19 [PATCH v3 00/26] compat_ioctl: cleanups Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 01/26] compat_ioctl: pppoe: fix PPPOEIOCSFWD handling Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 02/26] compat_ioctl: move simple ppp command handling into driver Arnd Bergmann
2019-04-17 21:13 ` Al Viro
2019-04-17 22:03 ` Arnd Bergmann
2019-04-17 23:53 ` Al Viro
2019-04-18 5:57 ` Al Viro
2019-04-18 15:14 ` Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 04/26] compat_ioctl: move PPPIOCSCOMPRESS32 to ppp-generic.c Arnd Bergmann
2019-04-17 21:16 ` Al Viro
2019-04-17 21:44 ` Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 05/26] compat_ioctl: move PPPIOCSPASS32/PPPIOCSACTIVE32 to ppp_generic.c Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 06/26] compat_ioctl: handle PPPIOCGIDLE for 64-bit time_t Arnd Bergmann
2019-04-16 20:19 ` [PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl Arnd Bergmann
2019-04-16 20:31 ` Jiri Kosina
2019-04-18 11:10 ` Stefan Hajnoczi
2019-04-19 23:16 ` Michael S. Tsirkin
2019-04-16 20:25 ` [PATCH v3 12/26] compat_ioctl: move more " Arnd Bergmann
2019-04-16 20:25 ` [PATCH v3 15/26] compat_ioctl: move isdn/capi ioctl translation into driver Arnd Bergmann
2019-04-16 20:25 ` [PATCH v3 16/26] compat_ioctl: move rfcomm handlers " Arnd Bergmann
2019-04-16 20:25 ` [PATCH v3 17/26] compat_ioctl: move hci_sock " Arnd Bergmann
2019-04-25 15:21 ` [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl Mauro Carvalho Chehab
2019-04-25 15:32 ` Arnd Bergmann
2019-04-25 15:35 ` Al Viro
2019-04-25 15:53 ` Mauro Carvalho Chehab [this message]
2019-04-25 15:55 ` Arnd Bergmann
2019-04-25 16:42 ` Al Viro
2019-04-25 21:25 ` Johannes Berg
2019-04-26 7:46 ` Arnd Bergmann
2019-04-16 22:33 ` [PATCH v3 00/26] compat_ioctl: cleanups Douglas Gilbert
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=20190425125301.5165cf15@coco.lan \
--to=mchehab+samsung@kernel$(echo .)org \
--cc=Jonathan.Cameron@huawei$(echo .)com \
--cc=amd-gfx@lists$(echo .)freedesktop.org \
--cc=arnd@arndb$(echo .)de \
--cc=bjorn.andersson@linaro$(echo .)org \
--cc=ceph-devel@vger$(echo .)kernel.org \
--cc=daniel.vetter@ffwll$(echo .)ch \
--cc=devel@driverdev$(echo .)osuosl.org \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=dsterba@suse$(echo .)com \
--cc=dvhart@infradead$(echo .)org \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=jgg@mellanox$(echo .)com \
--cc=linaro-mm-sig@lists$(echo .)linaro.org \
--cc=linux-btrfs@vger$(echo .)kernel.org \
--cc=linux-crypto@vger$(echo .)kernel.org \
--cc=linux-fsdevel@vger$(echo .)kernel.org \
--cc=linux-iio@vger$(echo .)kernel.org \
--cc=linux-input@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-media@vger$(echo .)kernel.org \
--cc=linux-nvdimm@lists$(echo .)01.org \
--cc=linux-nvme@lists$(echo .)infradead.org \
--cc=linux-pci@vger$(echo .)kernel.org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=linux-remoteproc@vger$(echo .)kernel.org \
--cc=linux-scsi@vger$(echo .)kernel.org \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=platform-driver-x86@vger$(echo .)kernel.org \
--cc=qat-linux@intel$(echo .)com \
--cc=sean@mess$(echo .)org \
--cc=sparclinux@vger$(echo .)kernel.org \
--cc=viro@zeniv$(echo .)linux.org.uk \
--cc=y2038@lists$(echo .)linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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