lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Jun 2009 22:10:52 -0400
From:	Brian Haley <brian.haley@...com>
To:	Johannes Berg <johannes@...solutions.net>
CC:	Netdev <netdev@...r.kernel.org>, Thomas Graf <tgraf@...g.ch>,
	"Eric W. Biederman" <ebiederm@...stanetworks.com>,
	Alexey Dobriyan <adobriyan@...il.com>
Subject: Re: [PATCH] genetlink: make netns aware

Johannes Berg wrote:
> This makes generic netlink network namespace aware.
> No actual generic netlink families are made namespace
> aware, they need to be checked one by one and then
> set the family->netnsok member to true.
> 
> Signed-off-by: Johannes Berg <johannes@...solutions.net>
...
> --- wireless-testing.orig/include/net/net_namespace.h	2009-06-17 20:36:59.000000000 +0200
> +++ wireless-testing/include/net/net_namespace.h	2009-06-17 21:05:52.000000000 +0200
> @@ -26,6 +26,7 @@ struct net_device;
>  struct sock;
>  struct ctl_table_header;
>  struct net_generic;
> +struct sock;
>  
>  struct net {
>  	atomic_t		count;		/* To decided when the network
> @@ -63,6 +64,7 @@ struct net {
>  	struct netns_packet	packet;
>  	struct netns_unix	unx;
>  	struct netns_ipv4	ipv4;
> +	struct sock		*genl_sock;
>  #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
>  	struct netns_ipv6	ipv6;
>  #endif

Maybe you want to move *genl_sock up near the *rtnl sock?  Just seemed
strange to be stuck in the middle here to me.

> @@ -429,6 +450,10 @@ static int genl_rcv_msg(struct sk_buff *
>  	if (family == NULL)
>  		return -ENOENT;
>  
> +	/* this family doesn't exist in this netns */
> +	if (!family->netnsok && net != &init_net)
> +		return -ENOENT;

I know there's a net_eq() inline that exists, and actually becomes a no-op
when namespaces aren't built-in, so it might be worthwhile to change it
throughout, even if the rest of networking isn't consistent in using it.

-Brian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ