From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Andreas Oberritter <obi@linuxtv.org>
Cc: Hans Petter Selasky <hselasky@c2i.net>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] FE_GET_PROPERTY should be _IOW, because the associated structure is transferred from userspace to kernelspace. Keep the old ioctl around for compatibility so that existing code is not broken.
Date: Fri, 03 Jun 2011 10:55:37 -0300 [thread overview]
Message-ID: <4DE8E7D9.9000608@redhat.com> (raw)
In-Reply-To: <4DE8D72E.7010300@linuxtv.org>
Em 03-06-2011 09:44, Andreas Oberritter escreveu:
> On 06/01/2011 11:15 PM, Mauro Carvalho Chehab wrote:
>> The dvb_usercopy will do the right thing, if we use _IOR or _IORW.
>
> It only works, because _IOC_READ triggers a copy_from_user, as a
> workaround for wrongly marked ioctls like this, according to a code
> comment. It does not really do the right thing, because in this special
> case the later call to copy_to_user isn't required. But it doesn't do
> any real harm either.
Yes, that's what I meant to say ;) The workaround for it is there already,
so maybe there are other ioctl's using the wrong _IOC_ directions.
As I said before, some ioctl's don't use _IOC_ directions, like for example
the tty ioctls like TIO* ones. This happens on several very old drivers.
So, ioctl core don't make any assumption about them. it is up to each driver
(or subsystem core) to handle it.
>> I prefer to not apply this patch, as it won't fix anything. Adding an _OLD means
>> that we'll need later to remove it, causing a regression. Ok, we may do like we did
>> with V4L _OLD ioctl's that were marked as _OLD at 2.6.5 and were removed on a late
>> 2.6.3x.
>
> Either way is fine for me.
I'm not against fixing it, but, in this case, we'll need to validate all DVB
ioctl's and remove the IOC_READ hack for all non-_OLD controls, and writing
a notice at features-to-be-removed announcing that the _OLD controls will be
removed.
Cheers,
Mauro.
>
> Regards,
> Andreas
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-06-03 13:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 13:58 [PATCH] FE_GET_PROPERTY should be _IOW, because the associated structure is transferred from userspace to kernelspace. Keep the old ioctl around for compatibility so that existing code is not broken Hans Petter Selasky
2011-05-23 14:37 ` Andreas Oberritter
2011-05-23 14:51 ` Hans Petter Selasky
2011-05-23 15:32 ` Andreas Oberritter
2011-06-01 21:15 ` Mauro Carvalho Chehab
2011-06-03 12:44 ` Andreas Oberritter
2011-06-03 13:55 ` Mauro Carvalho Chehab [this message]
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=4DE8E7D9.9000608@redhat.com \
--to=mchehab@redhat.com \
--cc=hselasky@c2i.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=obi@linuxtv.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.