Linux Container Development
 help / color / mirror / Atom feed
* [RFC][patch 0/1] fix allnoconfig for net-2.6.24
@ 2007-09-12 17:07 dlezcano-NmTC/0ZBporQT0dZR+AlfA
  2007-09-12 17:07 ` [RFC][patch 1/1] From: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org> dlezcano-NmTC/0ZBporQT0dZR+AlfA
       [not found] ` <20070912170739.187625566-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>
  0 siblings, 2 replies; 6+ messages in thread
From: dlezcano-NmTC/0ZBporQT0dZR+AlfA @ 2007-09-12 17:07 UTC (permalink / raw)
  To: ebiederm-aS9lmoZGLiVWk0Htik3J/w; +Cc: containers-qjLDD68F18O7TbgM5vRIOg

The kernel compilation fails with allnoconfig with an unresolved to init_net.
I tryed to figure out how to fix that. The problem is raised because the init_net
variable is defined as extern in net_namespace.h while the variable is declared
in net_namespace.c. This file is not compiled because of the config options and
that leads to the compilation error.

I noticed the uts namespace defines the init_uts_ns in init/version.c, so I moved
the init_net to this file too. The compilation error is fixed.

But I don't like really this approach because:
	1 - we fall under a part not covered by the network
	2 - we add a new include net_namespace.h in version.c

Does this fix seems correct ? I just want to fix it for now to have net-2.6.24
compiling for all configs.

-- 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC][patch 1/1] From: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
  2007-09-12 17:07 [RFC][patch 0/1] fix allnoconfig for net-2.6.24 dlezcano-NmTC/0ZBporQT0dZR+AlfA
@ 2007-09-12 17:07 ` dlezcano-NmTC/0ZBporQT0dZR+AlfA
       [not found] ` <20070912170739.187625566-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>
  1 sibling, 0 replies; 6+ messages in thread
From: dlezcano-NmTC/0ZBporQT0dZR+AlfA @ 2007-09-12 17:07 UTC (permalink / raw)
  To: ebiederm-aS9lmoZGLiVWk0Htik3J/w; +Cc: containers-qjLDD68F18O7TbgM5vRIOg

[-- Attachment #1: net-ns-fix-allnoconfig.patch --]
[-- Type: text/plain, Size: 1294 bytes --]

Fix allnoconfig compilation error

Signed-off-by: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
---
 init/version.c           |    4 ++++
 net/core/net_namespace.c |    3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)

Index: net-2.6.24/init/version.c
===================================================================
--- net-2.6.24.orig/init/version.c
+++ net-2.6.24/init/version.c
@@ -12,6 +12,7 @@
 #include <linux/utsname.h>
 #include <linux/utsrelease.h>
 #include <linux/version.h>
+#include <net/net_namespace.h>
 
 #define version(a) Version_ ## a
 #define version_string(a) version(a)
@@ -33,6 +34,9 @@ struct uts_namespace init_uts_ns = {
 };
 EXPORT_SYMBOL_GPL(init_uts_ns);
 
+struct net init_net;
+EXPORT_SYMBOL_GPL(init_net);
+
 /* FIXED STRINGS! Don't touch! */
 const char linux_banner[] =
 	"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
Index: net-2.6.24/net/core/net_namespace.c
===================================================================
--- net-2.6.24.orig/net/core/net_namespace.c
+++ net-2.6.24/net/core/net_namespace.c
@@ -19,9 +19,6 @@ LIST_HEAD(net_namespace_list);
 
 static struct kmem_cache *net_cachep;
 
-struct net init_net;
-EXPORT_SYMBOL_GPL(init_net);
-
 void net_lock(void)
 {
 	mutex_lock(&net_list_mutex);

-- 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][patch 0/1] fix allnoconfig for net-2.6.24
       [not found] ` <20070912170739.187625566-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>
@ 2007-09-12 17:23   ` Eric W. Biederman
  2007-09-12 17:45   ` Eric W. Biederman
  1 sibling, 0 replies; 6+ messages in thread
From: Eric W. Biederman @ 2007-09-12 17:23 UTC (permalink / raw)
  To: dlezcano-NmTC/0ZBporQT0dZR+AlfA; +Cc: containers-qjLDD68F18O7TbgM5vRIOg

dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org writes:

> The kernel compilation fails with allnoconfig with an unresolved to init_net.
> I tryed to figure out how to fix that. The problem is raised because the
> init_net
> variable is defined as extern in net_namespace.h while the variable is declared
> in net_namespace.c. This file is not compiled because of the config options and
> that leads to the compilation error.
>
> I noticed the uts namespace defines the init_uts_ns in init/version.c, so I
> moved
> the init_net to this file too. The compilation error is fixed.
>
> But I don't like really this approach because:
> 	1 - we fall under a part not covered by the network
> 	2 - we add a new include net_namespace.h in version.c
>
> Does this fix seems correct ? I just want to fix it for now to have net-2.6.24
> compiling for all configs.

Thanks for the testing and catching all of the little nit picky things.

Where is init_net used that is a problem with allnoconfig?

Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][patch 0/1] fix allnoconfig for net-2.6.24
       [not found] ` <20070912170739.187625566-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>
  2007-09-12 17:23   ` [RFC][patch 0/1] fix allnoconfig for net-2.6.24 Eric W. Biederman
@ 2007-09-12 17:45   ` Eric W. Biederman
       [not found]     ` <m1hclz93rg.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Eric W. Biederman @ 2007-09-12 17:45 UTC (permalink / raw)
  To: dlezcano-NmTC/0ZBporQT0dZR+AlfA; +Cc: containers-qjLDD68F18O7TbgM5vRIOg

dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org writes:

> The kernel compilation fails with allnoconfig with an unresolved to init_net.
> I tryed to figure out how to fix that. The problem is raised because the
> init_net
> variable is defined as extern in net_namespace.h while the variable is declared
> in net_namespace.c. This file is not compiled because of the config options and
> that leads to the compilation error.

Ok.  We seem to have the same issue with the ipc namespace.
And it uses the INIT_IPC_NS macro to handle it.

I wonder if we can do something similar here.

It looks like the initialization of nsproxy is the big gotcha.

> I noticed the uts namespace defines the init_uts_ns in init/version.c, so I
> moved
> the init_net to this file too. The compilation error is fixed.
>
> But I don't like really this approach because:
> 	1 - we fall under a part not covered by the network
> 	2 - we add a new include net_namespace.h in version.c
>
> Does this fix seems correct ? I just want to fix it for now to have net-2.6.24
> compiling for all configs.

I think we can probably spend a couple more hours and fix things cleanly.
If that we can't figure out a clean solution I'm happy to deal with the
hack.  But if we can find something clean and maintainable I would
very much prefer that.

So do you think you can come up with something based on the model
of INIT_IPC_NS?

Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][patch 0/1] fix allnoconfig for net-2.6.24
       [not found]     ` <m1hclz93rg.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
@ 2007-09-12 19:37       ` Daniel Lezcano
       [not found]         ` <46E84008.1000001-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Lezcano @ 2007-09-12 19:37 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: containers-qjLDD68F18O7TbgM5vRIOg

Eric W. Biederman wrote:
> dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org writes:
> 
>> The kernel compilation fails with allnoconfig with an unresolved to init_net.
>> I tryed to figure out how to fix that. The problem is raised because the
>> init_net
>> variable is defined as extern in net_namespace.h while the variable is declared
>> in net_namespace.c. This file is not compiled because of the config options and
>> that leads to the compilation error.
> 
> Ok.  We seem to have the same issue with the ipc namespace.
> And it uses the INIT_IPC_NS macro to handle it.
> 
> I wonder if we can do something similar here.
> 
> It looks like the initialization of nsproxy is the big gotcha.
> 
>> I noticed the uts namespace defines the init_uts_ns in init/version.c, so I
>> moved
>> the init_net to this file too. The compilation error is fixed.
>>
>> But I don't like really this approach because:
>> 	1 - we fall under a part not covered by the network
>> 	2 - we add a new include net_namespace.h in version.c
>>
>> Does this fix seems correct ? I just want to fix it for now to have net-2.6.24
>> compiling for all configs.
> 
> I think we can probably spend a couple more hours and fix things cleanly.
> If that we can't figure out a clean solution I'm happy to deal with the
> hack.  But if we can find something clean and maintainable I would
> very much prefer that.
> 
> So do you think you can come up with something based on the model
> of INIT_IPC_NS?

Sure, I will send it in a few hours ...

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][patch 0/1] fix allnoconfig for net-2.6.24
       [not found]         ` <46E84008.1000001-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
@ 2007-09-12 19:45           ` Eric W. Biederman
  0 siblings, 0 replies; 6+ messages in thread
From: Eric W. Biederman @ 2007-09-12 19:45 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: containers-qjLDD68F18O7TbgM5vRIOg

Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org> writes:

> Sure, I will send it in a few hours ...

Thanks.

Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-09-12 19:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-12 17:07 [RFC][patch 0/1] fix allnoconfig for net-2.6.24 dlezcano-NmTC/0ZBporQT0dZR+AlfA
2007-09-12 17:07 ` [RFC][patch 1/1] From: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org> dlezcano-NmTC/0ZBporQT0dZR+AlfA
     [not found] ` <20070912170739.187625566-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>
2007-09-12 17:23   ` [RFC][patch 0/1] fix allnoconfig for net-2.6.24 Eric W. Biederman
2007-09-12 17:45   ` Eric W. Biederman
     [not found]     ` <m1hclz93rg.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-09-12 19:37       ` Daniel Lezcano
     [not found]         ` <46E84008.1000001-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-09-12 19:45           ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox