From: Greg KH <gregkh@linuxfoundation.org>
To: Vlad Zolotarov <vladz@cloudius-systems.com>
Cc: linux-kernel@vger.kernel.org, mst@redhat.com, hjk@hansjkoch.de,
corbet@lwn.net, bruce.richardson@intel.com,
avi@cloudius-systems.com, gleb@cloudius-systems.com,
stephen@networkplumber.org, alexander.duyck@gmail.com
Subject: Re: [PATCH v5 1/4] uio: add ioctl support
Date: Wed, 7 Oct 2015 09:46:27 +0100 [thread overview]
Message-ID: <20151007084627.GA4270@kroah.com> (raw)
In-Reply-To: <1444151859-10217-2-git-send-email-vladz@cloudius-systems.com>
On Tue, Oct 06, 2015 at 08:17:36PM +0300, Vlad Zolotarov wrote:
> Add the ability for underlying device drivers to register the ioctl
> commands. This is useful when some interaction with the user space
> beyond sysfs capabilities is required, e.g. query the interrupt mode
> or bind eventfd to interrupt notifications (similarly to vfio ioctl
> VFIO_DEVICE_SET_IRQS).
>
> Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
> ---
> drivers/uio/uio.c | 15 +++++++++++++++
> include/linux/uio_driver.h | 3 +++
> 2 files changed, 18 insertions(+)
>
> diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
> index 8196581..714b0e5 100644
> --- a/drivers/uio/uio.c
> +++ b/drivers/uio/uio.c
> @@ -704,6 +704,20 @@ static int uio_mmap(struct file *filep, struct vm_area_struct *vma)
> }
> }
>
> +static long uio_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
> +{
> + struct uio_listener *listener = filep->private_data;
> + struct uio_device *idev = listener->dev;
> +
> + if (!idev->info)
> + return -EIO;
> +
> + if (!idev->info->ioctl)
> + return -ENOTTY;
> +
> + return idev->info->ioctl(idev->info, cmd, arg);
> +}
As Stephen said, I will not take this, sorry. It opens up the ability
to add "new system calls" to a huge range of crappy drivers, it's
something that vendors have been trying to push for years and is
something that I will not allow.
greg k-h
next prev parent reply other threads:[~2015-10-07 8:46 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 17:17 [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver Vlad Zolotarov
2015-10-06 17:17 ` [PATCH v5 1/4] uio: add ioctl support Vlad Zolotarov
2015-10-06 21:33 ` Stephen Hemminger
2015-10-07 8:17 ` Vlad Zolotarov
2015-10-07 8:18 ` Vlad Zolotarov
2015-10-07 8:46 ` Greg KH [this message]
2015-10-07 8:55 ` Vlad Zolotarov
2015-10-07 17:21 ` Greg KH
2015-10-07 17:28 ` Vlad Zolotarov
[not found] ` <CAOaVG17hMG7cAnD_DZ9J3pRMpXctx3o_EF8A62vtZx6Mv9c-2g@mail.gmail.com>
2015-10-07 19:00 ` Vlad Zolotarov
[not found] ` <CAOaVG147Fxq0VyohAFBvw4cxtLRw3qd2aNt-e2Vr4_R5EYs7zQ@mail.gmail.com>
2015-10-08 12:41 ` Vlad Zolotarov
2015-10-08 13:03 ` Greg Kroah-Hartman
2015-10-06 17:17 ` [PATCH v5 2/4] uio_pci_generic: properly initialize PCI bars mappings towards UIO Vlad Zolotarov
2015-10-06 17:17 ` [PATCH v5 3/4] uio_pci_generic: add MSI/MSI-X support Vlad Zolotarov
2015-10-06 21:36 ` Stephen Hemminger
2015-10-06 17:17 ` [PATCH v5 4/4] Documentation: update uio-howto Vlad Zolotarov
2015-10-06 18:27 ` [PATCH v5 0/4] uio: add MSI/MSI-X support to uio_pci_generic driver Michael S. Tsirkin
2015-10-06 20:35 ` Vlad Zolotarov
2015-10-06 20:48 ` Vlad Zolotarov
2015-10-06 22:51 ` Michael S. Tsirkin
2015-10-07 8:38 ` Vlad Zolotarov
2015-10-07 10:42 ` Michael S. Tsirkin
2015-10-07 13:44 ` Vlad Zolotarov
2015-10-07 13:55 ` Vlad Zolotarov
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=20151007084627.GA4270@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexander.duyck@gmail.com \
--cc=avi@cloudius-systems.com \
--cc=bruce.richardson@intel.com \
--cc=corbet@lwn.net \
--cc=gleb@cloudius-systems.com \
--cc=hjk@hansjkoch.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=stephen@networkplumber.org \
--cc=vladz@cloudius-systems.com \
/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).