From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Andreas Oberritter <obi@linuxtv.org>
Cc: HoP <jpetrous@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] vtunerc: virtual DVB device - is it ok to NACK driver because of worrying about possible misusage?
Date: Fri, 02 Dec 2011 09:14:47 -0200 [thread overview]
Message-ID: <4ED8B327.9090505@redhat.com> (raw)
In-Reply-To: <4ED805CB.5020302@linuxtv.org>
On 01-12-2011 20:55, Andreas Oberritter wrote:
> On 01.12.2011 21:38, Mauro Carvalho Chehab wrote:
>> I fail to see where do you need to duplicate dvb-core. An userspace
>> LD_PRELOAD handler that would do:
>>
>> int socket;
>>
>> int dvb_ioctl(int fd, unsigned long int request, ...)
>> {
>> void *arg;
>> va_list ap;
>>
>> va_start(ap, request);
>> arg = va_arg(ap, void *);
>> va_end(ap);
>>
>> send_net_ioctl_packet(socket, request, arg);
>> }
>>
>> Is probably all you need to send _any_ ioctl's to a remote machine
>> (plus client's machine that would decode the ioctl packet and send
>> the ioctl to the actual driver).
>>
>> Of course, you'll need hooks for all syscalls used (likely open, close,
>> ioctl, read, poll).
>>
>> So, there's not much duplication, even if, for whatever reason, you
>> might need to hook some specific ioctls in order to optimize the
>> network performance.
>
> Mauro, we've already had that discussion last time. In order to
> intercept ioctls of a device, the device needs to exist to begin with,
> right? That's where vtuner comes in: It creates the virtual device.
Yes.
> For that reason your suggested approach using LD_PRELOAD won't work.
If you're referring to the device name under /dev, a daemon emulating
a physical device could create Unix sockets under /dev/dvb.
Or (with is the right solution) bind such library into the applications
that will be used.
> Besides that, suggesting LD_PRELOAD for something other than a hack
> can't be taken seriously.
A Kernel pigback plugin is also a hack.
> I think you didn't even understand what vtuner does, after all the
> discussion that took place.
>
>>>>> Of course
>>>>> I can be wrong, I'm no big kernel hacker. So please show me the
>>>>> way for it. BTW, even if you can find the way, then data copying
>>>>> from userspace to the kernel and back is also necessery.
>>>>
>>>> See libv4l, at v4l2-utils.git (at linuxtv.org).
>>>>
>>>>> I really
>>>>> don't see any advantage of you solution.
>>>>
>>>> And I can't see any advantage on yours ;) Putting something that belongs
>>>> to userspace into kernelspace just because it is easier to re-use the
>>>> existing code inside the kernel is not a good argument.
>>>
>>> It is only your POV that it should be in userspace.
>>>
>>> Creating additional code which not only enlarge code size by 2
>>> but I think by 10 is really not good idea. And it get no advantage
>>> only disadvantages.
>>>
>>>>
>>>> Don't get me wrong but if you want to submit a code to be merged
>>>> on any existing software (being open source or not), you should be
>>>> prepared to defend your code and justify the need for it to the
>>>> other developers.
>>>
>>> Sure. I was prepared for technical disscussion, but was fully suprised
>>> that it was not happend (ok, to be correct, few guys are exception, like
>>> Andreas and few others. I really appreciate it).
>>>
>>> So, my question was still not answered: "Can be driver NACKed only
>>> because of worrying about possible misuse?"
>>
>> To answer your question: your driver were nacked because of several
>> reasons:
>> it is not a driver for an unsupported hardware,
>
> It's not a driver for supported hardware either. You named it before:
> It's not a driver in your definition at all. It's a way to remotely
> access digital TV tuners over a network.
Yes, this is not a driver. It is just a hack to avoid adding network
support at the userspace applications.
>> you failed to convince
>> people
>> why this can't be implemented on userspace,
>
> Wrong. You failed to convince people why this must be implemented in
> userspace. Even Michael Krufky, who's "only" against merging it, likes
> the idea, because it's useful.
Sometimes, when I'm debugging a driver, I use to add several hacks inside
the kernelspace, in order to do things that are useful on my development
(debug printk's, dirty hacks, etc). I even have my own set of patches that
I apply on kvm, in order to sniff PCI traffic. This doesn't mean that
I should send all those crap upstream.
> Just because something can be implemented in userspace doesn't mean that
> it's technically superior.
True, but I didn't see anything at the submitted code or at the discussions
showing that implementing it in kernelspace is technically superior.
What I'm seeing is what is coded there:
http://code.google.com/p/vtuner/
The kernelspace part is just a piggyback driver, that just copies data from/to
the dvb calls into another device, that sends the request back to userspace.
A separate userspace daemon will get such results and send to the network stack:
http://code.google.com/p/vtuner/source/browse/vtuner-network.c?repo=apps
This is technically inferior of letting the application just talk to vtuner
directly via some library call.
Btw, applications like vdr, vlc, kaffeine and others already implement their
own ways to remotelly access the DVB devices without requiring any
kernelspace piggyback driver.
>> the driver adds hooks at
>> kernelspace
>> that would open internal API's that several developers don't agree on
>> exposing
>> at userspace, as would allow non GPL license compatible drivers to re-use
>> their work in a way they are against.
>
> What's left is your unreasonable GPL blah blah. So the answer to Honza's
> question is: Yes, Mauro is nacking the driver because he's worrying
> about possible misuse.
>
> Regards,
> Andreas
next prev parent reply other threads:[~2011-12-02 11:14 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 21:38 [RFC] vtunerc: virtual DVB device - is it ok to NACK driver because of worrying about possible misusage? HoP
2011-11-30 21:52 ` Michael Krufky
2011-12-01 0:09 ` Andreas Oberritter
2011-12-01 11:04 ` Mauro Carvalho Chehab
2011-12-01 14:58 ` HoP
2011-12-01 17:38 ` Mauro Carvalho Chehab
2011-12-01 19:59 ` HoP
2011-12-01 20:38 ` Mauro Carvalho Chehab
2011-12-01 22:55 ` Andreas Oberritter
2011-12-02 11:14 ` Mauro Carvalho Chehab [this message]
2011-12-02 11:40 ` Rémi Denis-Courmont
2011-12-02 11:48 ` Andreas Oberritter
2011-12-02 12:05 ` Rémi Denis-Courmont
2011-12-02 11:57 ` HoP
2011-12-02 17:33 ` Mauro Carvalho Chehab
[not found] ` <3D233F78EE854A4BA3D34C11AD4FAC1FDD141F@nasanexd01b.na.qualcomm.com>
2011-12-05 18:16 ` V4L2 driver node directory structure under /video directory Mauro Carvalho Chehab
2011-12-02 17:49 ` [RFC] vtunerc: virtual DVB device - is it ok to NACK driver because of worrying about possible misusage? Rémi Denis-Courmont
2011-12-02 18:16 ` Andreas Oberritter
2011-12-02 18:28 ` Andreas Oberritter
2011-12-02 23:19 ` Alan Cox
2011-12-03 0:37 ` HoP
2011-12-05 10:21 ` Florian Fainelli
2011-12-05 14:28 ` HoP
2011-12-05 15:16 ` Alan Cox
2011-12-05 15:18 ` Michael Krufky
2011-12-06 0:16 ` HoP
2011-12-05 17:39 ` Mauro Carvalho Chehab
2011-12-05 20:41 ` Andreas Oberritter
2011-12-05 20:55 ` Alan Cox
2011-12-05 21:20 ` Andreas Oberritter
2011-12-05 21:54 ` Alan Cox
2011-12-06 11:18 ` Mark Brown
2011-12-06 12:01 ` Andreas Oberritter
2011-12-06 13:10 ` Mauro Carvalho Chehab
2011-12-06 13:35 ` Andreas Oberritter
2011-12-06 14:13 ` Mauro Carvalho Chehab
2011-12-06 14:38 ` Andreas Oberritter
2011-12-06 15:06 ` Mauro Carvalho Chehab
2011-12-06 15:36 ` Manu Abraham
2011-12-06 11:21 ` Mark Brown
2011-12-06 12:01 ` Andreas Oberritter
2011-12-06 14:19 ` Mark Brown
2011-12-06 14:48 ` Andreas Oberritter
2011-12-07 13:49 ` Mark Brown
2011-12-07 14:01 ` Andreas Oberritter
2011-12-07 16:10 ` Mark Brown
2011-12-07 16:56 ` Andreas Oberritter
2011-12-07 16:58 ` Andreas Oberritter
2011-12-07 21:48 ` Patrick Dickey
2011-12-07 22:53 ` Honza Petrouš
2011-12-07 23:55 ` Andreas Oberritter
2011-12-06 17:19 ` Manu Abraham
2011-12-06 0:07 ` HoP
2011-12-06 13:22 ` Mauro Carvalho Chehab
2011-12-06 13:49 ` Andreas Oberritter
2011-12-06 14:19 ` Rémi Denis-Courmont
2011-12-06 15:05 ` Andreas Oberritter
2011-12-06 14:20 ` Mauro Carvalho Chehab
2011-12-06 15:00 ` Andreas Oberritter
2011-12-06 17:35 ` HoP
2011-12-03 16:13 ` Andreas Oberritter
2011-12-03 16:42 ` Alan Cox
2011-12-03 17:38 ` Andreas Oberritter
2011-12-03 17:21 ` VDR User
2011-12-03 17:42 ` Alan Cox
2011-12-03 17:48 ` Devin Heitmueller
2011-12-04 23:54 ` HoP
2011-12-03 18:13 ` Hans Petter Selasky
2011-12-05 0:05 ` HoP
2011-12-03 18:17 ` Andreas Oberritter
2011-12-03 23:30 ` Walter Van Eetvelt
2011-12-04 0:14 ` VDR User
2011-12-04 14:44 ` Alan Cox
2011-12-04 23:22 ` HoP
2011-12-05 1:45 ` VDR User
2011-12-05 6:20 ` HoP
2011-12-01 11:50 ` Communication misunderstanding? (was: Re: [RFC] vtunerc: virtual DVB device - is it ok to NACK driver because of worrying about possible misusage?) Patrick Boettcher
2011-12-01 12:33 ` [RFC] vtunerc: virtual DVB device Rémi Denis-Courmont
2011-12-01 14:39 ` HoP
2011-12-02 18:32 ` [RFC] vtunerc: virtual DVB device - is it ok to NACK driver because of worrying about possible misusage? VDR User
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=4ED8B327.9090505@redhat.com \
--to=mchehab@redhat.com \
--cc=jpetrous@gmail.com \
--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 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).