From: ebiederm@xmission.com (Eric W. Biederman)
To: Daniel Lezcano <daniel.lezcano@free.fr>
Cc: Ben Greear <greearb@candelatech.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
containers@lists.osdl.org, Mark Lord <lkml@rtr.ca>,
Stephen Hemminger <shemminger@linux-foundation.org>,
David Miller <davem@davemloft.net>
Subject: Re: namespace support requires network modules to say "GPL"
Date: Tue, 04 Dec 2007 11:03:01 -0700 [thread overview]
Message-ID: <m163zexrqi.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <475451B1.1030006@free.fr> (Daniel Lezcano's message of "Mon, 03 Dec 2007 19:57:53 +0100")
Daniel Lezcano <daniel.lezcano@free.fr> writes:
> Ben Greear wrote:
>>> Once things are largely complete it makes sense to argue with out of
>>> tree module authors that because they don't have network namespace
>>> support in their modules, their modules are broken.
>> Does this imply that every module that accesses the network code *must* become
>> GPL simply because it must interact with namespace logic that is exported as
>> GPL only symbols?
>
> That's right, with init_net's EXPORT_SYMBOL_GPL and dev_get_xx, we enforce
> people to be GPL whatever they didn't asked to have the namespaces in their
> code.
>
> Eric, why can we simply change EXPORT_SYMBOL_GPL to EXPORT_SYMBOL for init_net ?
Hmm. I need to think this one through.
EXPORT_SYMBOL_GPL acts as a strong hint, and a hindrance to using
symbols in a non-GPL'd module. Not exactly an enforcement mechanism.
...
The current pattern is to first change the code to only work in the
initial network namespace. Which can usually be done with a few
trivial lines of code that utilize init_net.
Then the pattern is to move the globals (or at least a pointer to
them) into struct net, and utilize register_pernet_subsys to ensure
those variables are properly initialized and cleaned up after.
However there also seem to be simpler cases like Ben's bridge module,
that don't appear to have any global state.
Ben I don't have a clue how your user space interface works. My gut
feel is that you can likely use sk->sk_net (if your configuration is
through a socket), or failing that current->nsproxy->net_ns. To get
the network namespace to look up "eth0" and "eth1".
This however still begs the question how do we want to handle this
so there is a minimum of pain.
Since using register_pernet_subsys implies you need your own member
in struct net. I am inclined to leave that with the GPL hint on
the EXPORT as you need to be really tight with the system to use that.
...
Currently I don't know if the _GPL hint on the export of init_net buys
us anything except trouble so I am almost inclined to do something
there.
....
What really disturbs me is that as I look at this I see that we have
historically at least done a very haphazard job of maintaining our
kernel/userspace ABIs while making a commitment to maintain them
forever. Especially if as it seems that some would see that
commitment extending beyond the code that is ever potentially
mergable with the kernel.
....
Currently the only angle that I can see that makes sense to me in the
argument for change of how we are currently doing things is that by
adding a parameter to new existing functions I make it very difficult
for code with network namespace support to have one version that works
on both old and new kernels as we can not define the new API on the
old hardware.
I can see some technical merit in making that case better.
.....
My thinking on the namespaces have been that their interfaces are new
core kernel interfaces that have not existed on any other kernel. And
as such any code that needed to use those interfaces was:
a) definitely a derived work of the kernel.
b) was a core part of the kernel, and we don't even want normal
day to day drivers using those interfaces much less weird
random code outside of the kernel.
The above is why I habitually place a _GPL hint on my exports
of namespace related functions and data. To strongly suggest
to module authors that they are getting into hot water if
they use these interfaces and don't merge their code.
So far I really don't see anything to challenge my understanding above
but I am human and as such my heuristics for analysis and understanding
are not guaranteed to give me the right answer.
....
I don't want this to be a stupid political fight about GPL stuff.
Generally I am with Alan in not seeing any basis for distributing
non-GPL code that works in the kernel. Although I see Linus' point
that a legal case may be made that certain modules are not a
derivative work of the kernel.
...
I am confused. I don't see a path forward that feels right.
So I am going to sit and think about this some more, before I do anything.
Eric
next prev parent reply other threads:[~2007-12-04 18:05 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-01 9:06 [PATCH 0/10] sysfs network namespace support Eric W. Biederman
2007-12-01 9:12 ` [PATCH 01/10] sysfs: Make sysfs_mount static again Eric W. Biederman
2007-12-01 9:13 ` [PATCH 02/10] sysfs: Support for preventing unmounts Eric W. Biederman
2007-12-01 9:16 ` [PATCH 03/10] sysfs: sysfs_get_dentry add a sb parameter Eric W. Biederman
2007-12-01 9:18 ` [PATCH 04/10] sysfs: Implement __sysfs_get_dentry Eric W. Biederman
2007-12-01 9:23 ` [PATCH 05/10] sysfs: Rename Support multiple superblocks Eric W. Biederman
2007-12-01 9:25 ` [PATCH 06/10] sysfs: sysfs_chmod_file handle " Eric W. Biederman
2007-12-01 9:28 ` [PATCH 07/10] sysfs: Implement sysfs tagged directory support Eric W. Biederman
2007-12-01 9:30 ` [PATCH 08/10] sysfs: Implement sysfs_delete_link and sysfs_rename_link Eric W. Biederman
2007-12-01 9:33 ` [PATCH 09/10] driver core: Implement tagged directory support for device classes Eric W. Biederman
2007-12-01 9:35 ` [PATCH 10/10] net: Enable tagging for net_class directories in sysfs Eric W. Biederman
2007-12-01 13:10 ` namespace support requires network modules to say "GPL" Mark Lord
2007-12-01 13:13 ` Mark Lord
2007-12-01 19:17 ` Stephen Hemminger
2007-12-01 19:23 ` Alan Cox
2007-12-01 19:38 ` Stephen Hemminger
2007-12-01 19:45 ` Alan Cox
2007-12-01 20:13 ` Eric W. Biederman
2007-12-01 20:21 ` Mark Lord
2007-12-01 20:29 ` Arjan van de Ven
2007-12-01 22:12 ` Mark Lord
2007-12-01 23:13 ` Eric W. Biederman
2007-12-01 23:24 ` Jiri Slaby
2007-12-02 1:14 ` Eric W. Biederman
2007-12-01 23:51 ` Mark Lord
2007-12-02 1:08 ` Eric W. Biederman
2007-12-01 20:52 ` Eric W. Biederman
2007-12-01 22:13 ` Mark Lord
2007-12-03 0:02 ` David Schwartz
2007-12-03 0:14 ` Alan Cox
2007-12-01 19:54 ` Eric W. Biederman
2007-12-02 0:30 ` Stephen Hemminger
2007-12-02 2:02 ` Eric W. Biederman
2007-12-02 3:34 ` Mark Lord
2007-12-02 4:23 ` Stephen Hemminger
2007-12-02 19:28 ` Ben Greear
2007-12-02 20:03 ` Patrick McHardy
2007-12-02 20:43 ` Adrian Bunk
2007-12-02 21:59 ` Patrick McHardy
2007-12-03 1:14 ` Adrian Bunk
2007-12-03 8:33 ` Denis V. Lunev
2007-12-03 17:35 ` Eric W. Biederman
2007-12-03 18:19 ` Ben Greear
2007-12-03 18:57 ` Daniel Lezcano
2007-12-04 15:19 ` Daniel Lezcano
2007-12-04 18:03 ` Eric W. Biederman [this message]
2007-12-04 18:44 ` Ben Greear
2007-12-04 19:17 ` Eric W. Biederman
2007-12-04 19:35 ` Ben Greear
2007-12-04 20:09 ` Eric W. Biederman
2007-12-05 6:14 ` David Miller
2007-12-05 6:01 ` David Miller
2007-12-04 17:59 ` Eric W. Biederman
2007-12-04 18:57 ` Ben Greear
2007-12-04 20:01 ` Eric W. Biederman
2007-12-05 6:07 ` David Miller
2007-12-03 8:24 ` Romano Giannetti
2007-12-03 15:34 ` Arjan van de Ven
2007-12-03 18:03 ` Eric W. Biederman
2007-12-03 18:13 ` David Miller
2007-12-02 13:51 ` Alan Cox
2007-12-02 19:56 ` Valdis.Kletnieks
2007-12-21 3:07 ` [PATCH 0/10] sysfs network namespace support Greg KH
2007-12-21 13:04 ` Eric W. Biederman
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=m163zexrqi.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=containers@lists.osdl.org \
--cc=daniel.lezcano@free.fr \
--cc=davem@davemloft.net \
--cc=greearb@candelatech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@rtr.ca \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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
Powered by JetHome