[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1Bh9NnncbcT0X4fKWC7B0FnqYyEMUwB6MvmzaNO7VhFQ@mail.gmail.com>
Date: Mon, 24 Sep 2018 23:17:01 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Darren Hart <dvhart@...radead.org>,
Al Viro <viro@...iv.linux.org.uk>,
Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
gregkh <gregkh@...uxfoundation.org>,
David Miller <davem@...emloft.net>,
driverdevel <devel@...verdev.osuosl.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
qat-linux@...el.com,
"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
<linux-crypto@...r.kernel.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
linaro-mm-sig@...ts.linaro.org, amd-gfx@...ts.freedesktop.org,
"open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
linux-iio@...r.kernel.org, linux-rdma <linux-rdma@...r.kernel.org>,
linux-nvdimm@...ts.01.org, linux-nvme@...ts.infradead.org,
linux-pci <linux-pci@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
linux-remoteproc@...r.kernel.org,
sparclinux <sparclinux@...r.kernel.org>,
linux-scsi <linux-scsi@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
linux-fbdev@...r.kernel.org,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-btrfs <linux-btrfs@...r.kernel.org>,
ceph-devel <ceph-devel@...r.kernel.org>,
linux-wireless <linux-wireless@...r.kernel.org>,
Networking <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg
On Mon, Sep 24, 2018 at 10:35 PM Jason Gunthorpe <jgg@...pe.ca> wrote:
> On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote:
> > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe <jgg@...pe.ca> wrote:
> > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote:
> > > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote:
> > > > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote:
> > We already do this inside of some subsystems, notably drivers/media/,
> > and it simplifies the implementation of the ioctl handler function
> > significantly. We obviously cannot do this in general, both because of
> > traditional drivers that have 16-bit command codes (drivers/tty and others)
> > and also because of drivers that by accident defined the commands
> > incorrectly and use the wrong type or the wrong direction in the
> > definition.
>
> That could work well, but the first idea could be done globally and
> mechanically, while this would require very careful per-driver
> investigation.
>
> Particularly if the core code has worse performance.. ie due to
> kmalloc calls or something.
>
> I think it would make more sense to start by having the core do the
> case to __user and then add another entry point to have the core do
> the copy_from_user, and so on.
Having six separate callback pointers to implement a single
system call seems a bit excessive though.
Arnd
Powered by blists - more mailing lists