linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Mark Lord <lkml@rtr.ca>
Cc: Arjan van de Ven <arjan@infradead.org>,
	Stephen Hemminger <shemminger@linux-foundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Greg Kroah-Hartman <gregkh@suse.de>, Greg KH <greg@kroah.com>,
	Tejun Heo <htejun@gmail.com>,
	Linux Containers <containers@lists.osdl.org>,
	netdev@vger.kernel.org, cornelia.huck@de.ibm.com,
	stern@rowland.harvard.edu, kay.sievers@vrfy.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	David Miller <davem@davemloft.net>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: namespace support requires network modules to say "GPL"
Date: Sat, 01 Dec 2007 18:08:09 -0700	[thread overview]
Message-ID: <m1eje552fa.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <4751F380.7040309@rtr.ca> (Mark Lord's message of "Sat, 01 Dec 2007 18:51:28 -0500")

Mark Lord <lkml@rtr.ca> writes:

> Eric W. Biederman wrote:
>> Mark Lord <lkml@rtr.ca> writes:
>>
>>> Arjan van de Ven wrote:
>>>> On Sat, 01 Dec 2007 15:21:12 -0500
>>>> Mark Lord <lkml@rtr.ca> wrote:
>>>>
>>>>> Eric W. Biederman wrote:
>>>>>> Stephen Hemminger <shemminger@linux-foundation.org> writes:
>>>>>> Sure.  We keep the updated dev_get_by_XXXX that takes a network
>>>>>> namespace parameter.
>>>>> ..
>>>>>
>>>>> And what should code be passing in when "# CONFIG_NET_NS is not set" ?
>>>> network drivers probably really really don't want to call
>>>> dev_get_by_XXX...
>>> ..
>>>
>>> Fine.  But all of them want to call sk_alloc(),
>>
>> network drivers should be calling sk_alloc less then they should
>> call dev_get_by_XXXX.  Only protocols call sk_alloc.
> ..
>
> I think I saw some bridge code that calls it, too.
> Regardless, it's EXPORT_SYMBOL(), but now unusable
> due to the GPL-only symbol "init_net".
>
> Meanwhile, you are avoiding answering the question:

What EXPORT_SYMBOL_GPL means is I don't have a clue how you
can use this without being a derivative work of the linux kernel.  I
think that is true for init_net and I stand by that.  It is a very
internal symbol.

Further the only case that I think might pass the derivative work
test would be a network driver, and I am not affecting those.

I also believe that since it isn't mandatory you get your struct
net pointer by taking the address of a GPL only symbol that
those interfaces can continue to be used.

However I do suspect you are right that it may be more correct
to realized that only a derivative work could possibly use those
interfaces and tell 3rd parties that loud and clear.

We also have the policy of not changing exports from EXPORT_SYMBOL
to EXPORT_SYMBOL_GPL.  So making that such a change is difficult.

>>>>> And what should code be passing in when "# CONFIG_NET_NS is not set" ?
> ..
>
>>> and many want to do register_netdev().
>>
>> I haven't even touched register_netdev.
> ..
>
> Bull-pucky.  Somebody did:
>
>> @@ -3361,6 +3595,8 @@ int register_netdevice(struct net_device *dev)
>>
>>         /* When net_device's are persistent, this will be fatal. */
>>         BUG_ON(dev->reg_state != NETREG_UNINITIALIZED);
>> +       BUG_ON(!dev->nd_net);
>> +       net = dev->nd_net;
>>
>>         spin_lock_init(&dev->queue_lock);
>>         spin_lock_init(&dev->_xmit_lock);
> ..
>
> That new BUG_ON() line complains if nd_net has not been initialized,
> and the only thing I see drivers putting there is GPL-only "&init_net".

Yes and alloc_netdev initializes it.  All network drivers are required
to call alloc_netdev.

So register_netdev from a device driver perspective has not changed.

Anything the above change breaks happens to be a broken network device
driver.

>>> So what should they be using there ?
>>
>> What are you having problems with?
> ..
>
> Avoiding the question again there, too.

No.  I am saying that I don't see a problem.  All of the real world
problems that I actually know of are code bugs.  I asked for
a real world problem to see if there was something I was missing
in my analysis.  That isn't avoiding the problem that is trying
to see if I was wrong.

> I personally am not having problems with anything.
> But I noticed the API change, and would like somebody to fix it.
> Any of the three ways (or a fourth, if you've got one) might do.

Honestly I think I have done the best I can with the knowledge and
information that I have.    I do not think dropping the GPL from
the export of init_net makes sense.  I think turning a NULL into
init_net is a technical joke.  That parameter is there because
that is someplace where we need to pay attention to our network
namespace.

Which only leaves your first option of making more symbols
EXPORT_SYMBOL_GPL as even interesting.

That would seem to make some sense, given the attitudes and
perceptions of the current network developers.  

However I'm not volunteering for that one as finishing up the network
and pid namespaces already has my plate full.

Eric

  reply	other threads:[~2007-12-02  1:10 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 [this message]
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
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=m1eje552fa.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=containers@lists.osdl.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=htejun@gmail.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@rtr.ca \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    --cc=stern@rowland.harvard.edu \
    --cc=torvalds@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;
as well as URLs for NNTP newsgroup(s).