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: <qdxj5g326tpu3sczuhveknkvcsn6a3rngfm6plmwmbq22oof6e@qcapgrdp4n3x>
Date: Mon, 15 Sep 2025 14:02:45 +0200
From: Jan Kara <jack@...e.cz>
To: Christian Brauner <brauner@...nel.org>
Cc: Jan Kara <jack@...e.cz>, Amir Goldstein <amir73il@...il.com>, 
	linux-fsdevel@...r.kernel.org, Josef Bacik <josef@...icpanda.com>, 
	Jeff Layton <jlayton@...nel.org>, Mike Yuan <me@...dnzj.com>, 
	Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>, Lennart Poettering <mzxreary@...inter.de>, 
	Daan De Meyer <daan.j.demeyer@...il.com>, Aleksa Sarai <cyphar@...har.com>, 
	Alexander Viro <viro@...iv.linux.org.uk>, Jens Axboe <axboe@...nel.dk>, Tejun Heo <tj@...nel.org>, 
	Johannes Weiner <hannes@...xchg.org>, Michal Koutný <mkoutny@...e.com>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, 
	Chuck Lever <chuck.lever@...cle.com>, linux-nfs@...r.kernel.org, linux-kselftest@...r.kernel.org, 
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, cgroups@...r.kernel.org, 
	netdev@...r.kernel.org
Subject: Re: [PATCH v2 21/33] net: support ns lookup

On Fri 12-09-25 13:52:44, Christian Brauner wrote:
> Support the generic ns lookup infrastructure to support file handles for
> namespaces.
> 
> The network namespace has a separate list with different lifetime rules
> which we can just leave in tact. We have a similar concept for mount
> namespaces as well where it is on two differenet lists for different
> purposes.
> 
> Signed-off-by: Christian Brauner <brauner@...nel.org>

Just some nits below. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
> index 025a7574b275..42075748dff1 100644
> --- a/include/net/net_namespace.h
> +++ b/include/net/net_namespace.h
> @@ -11,6 +11,7 @@
>  #include <linux/list.h>
>  #include <linux/sysctl.h>
>  #include <linux/uidgid.h>
> +#include <linux/nstree.h>
>  
>  #include <net/flow.h>
>  #include <net/netns/core.h>

Why this include?

> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
> index 5fb7bd8ac45a..169ec22c4758 100644
> --- a/net/core/net_namespace.c
> +++ b/net/core/net_namespace.c
> @@ -20,6 +20,7 @@
>  #include <linux/sched/task.h>
>  #include <linux/uidgid.h>
>  #include <linux/proc_fs.h>
> +#include <linux/nstree.h>
>  
>  #include <net/aligned_data.h>
>  #include <net/sock.h>
> @@ -445,7 +446,7 @@ static __net_init int setup_net(struct net *net)
>  	LIST_HEAD(net_exit_list);
>  	int error = 0;
>  
> -	net->net_cookie = atomic64_inc_return(&net_aligned_data.net_cookie);
> +	net->net_cookie = ns_tree_gen_id(&net->ns);

net_cookie seems to be unused now and can be deleted?

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ