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]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CB33641@AcuExch.aculab.com>
Date:	Tue, 12 May 2015 08:24:11 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	"'Eric W. Biederman'" <ebiederm@...ssion.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	Ying Xue <ying.xue@...driver.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"cwang@...pensource.com" <cwang@...pensource.com>,
	"xemul@...nvz.org" <xemul@...nvz.org>,
	"eric.dumazet@...il.com" <eric.dumazet@...il.com>,
	"maxk@....qualcomm.com" <maxk@....qualcomm.com>,
	"stephen@...workplumber.org" <stephen@...workplumber.org>,
	"tgraf@...g.ch" <tgraf@...g.ch>,
	"nicolas.dichtel@...nd.com" <nicolas.dichtel@...nd.com>,
	"tom@...bertland.com" <tom@...bertland.com>,
	"jchapman@...alix.com" <jchapman@...alix.com>,
	"erik.hugne@...csson.com" <erik.hugne@...csson.com>,
	"jon.maloy@...csson.com" <jon.maloy@...csson.com>,
	"horms@...ge.net.au" <horms@...ge.net.au>,
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: RE: [PATCH 2/6] net: Add a struct net parameter to sock_create_kern

From: Eric W. Biederman
> Sent: 09 May 2015 03:08
>
> This is long overdue, and is part of cleaning up how we allocate kernel
> sockets that don't reference count struct net.
...
> diff --git a/net/socket.c b/net/socket.c
> index b5f1f43ed8f4..9963a0b53a64 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -1210,9 +1210,9 @@ int sock_create(int family, int type, int protocol, struct socket **res)
>  }
>  EXPORT_SYMBOL(sock_create);
> 
> -int sock_create_kern(int family, int type, int protocol, struct socket **res)
> +int sock_create_kern(struct net *net, int family, int type, int protocol, struct socket **res)
>  {
> -	return __sock_create(&init_net, family, type, protocol, res, 1);
> +	return __sock_create(net, family, type, protocol, res, 1);
>  }
>  EXPORT_SYMBOL(sock_create_kern);

Wouldn't it involve far less churn to add a new function that uses a non-default
namespace?

Changing the function prototype will a PITA for anyone doing back-ports of fixes.
(And more so for anyone trying to get a driver to build against kernels
that might have this change back-ported.)

	David

--
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