OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 2/2] move unneeded data to initdata section
Re: [PATCH 2/2] move unneeded data to initdata section [message #23354 is a reply to message #23353] Thu, 15 November 2007 19:34 Go to previous messageGo to previous message
Sam Ravnborg is currently offline  Sam Ravnborg
Messages: 9
Registered: April 2006
Junior Member
On Thu, Nov 15, 2007 at 10:17:14PM +0300, Denis V. Lunev wrote:
> 
> will you mind against this?

> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
> index 5dd6d90..d136707 100644
> --- a/include/net/net_namespace.h
> +++ b/include/net/net_namespace.h
> @@ -119,10 +119,14 @@ static inline struct net *maybe_get_net(struct net *net)
>  #ifdef CONFIG_NET_NS
>  #define __net_init
>  #define __net_exit
> -#define __net_initdata
>  #else
>  #define __net_init	__init
>  #define __net_exit	__exit_refok
> +#endif
> +
> +#if defined(CONFIG_NET_NS) || defined(MODULE)
> +#define __net_initdata
> +#else
>  #define __net_initdata	__initdata
>  #endif
  
n principle I am against this approach.
__initdata is far too overloaded with different stuff.

A much more preferred approach should be to create new sections
named for example .init.data.net and .init.data.net.module

And then in include/asm-generic/vmlinux.lds.h decide the
location of these sections.

On top of this we would have to teach modpost about these new sections.
But the advantage of this approach is that the section mismatch
checks are *independent* of the module being a MODULE or build-in.
The check will still happen.

In this way we avoid the situation where a warning only pops up
in certain configurations.

To do so will obviously require a bit more linker script
consolidation but if you or some else could step in a do this
it would be great!

	Sam
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC PATCH] namespaces: document unshare security implications
Next Topic: [patch 1/1][NETNS] fix fib_frontend compilation error
Goto Forum:
  


Current Time: Sat Oct 19 04:28:28 GMT 2024

Total time taken to generate the page: 0.05187 seconds