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: <mz25i4gk6wx2634wn7eb6l4ft2vh4gjhqq7zagajyjdq7rt4kv@u3r35wjzavy3>
Date: Mon, 15 Sep 2025 13:56:06 +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 20/33] ipc: support ns lookup

On Fri 12-09-25 13:52:43, Christian Brauner wrote:
> Support the generic ns lookup infrastructure to support file handles for
> namespaces.
> 
> Signed-off-by: Christian Brauner <brauner@...nel.org>

Looks good. Feel free to add:

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

								Honza

> ---
>  ipc/msgutil.c   | 1 +
>  ipc/namespace.c | 3 +++
>  ipc/shm.c       | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/ipc/msgutil.c b/ipc/msgutil.c
> index c7be0c792647..bbf61275df41 100644
> --- a/ipc/msgutil.c
> +++ b/ipc/msgutil.c
> @@ -15,6 +15,7 @@
>  #include <linux/proc_ns.h>
>  #include <linux/uaccess.h>
>  #include <linux/sched.h>
> +#include <linux/nstree.h>
>  
>  #include "util.h"
>  
> diff --git a/ipc/namespace.c b/ipc/namespace.c
> index d4188a88ee57..9f923c1a1eb3 100644
> --- a/ipc/namespace.c
> +++ b/ipc/namespace.c
> @@ -15,6 +15,7 @@
>  #include <linux/mount.h>
>  #include <linux/user_namespace.h>
>  #include <linux/proc_ns.h>
> +#include <linux/nstree.h>
>  #include <linux/sched/task.h>
>  
>  #include "util.h"
> @@ -85,6 +86,7 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
>  
>  	sem_init_ns(ns);
>  	shm_init_ns(ns);
> +	ns_tree_add(ns);
>  
>  	return ns;
>  
> @@ -201,6 +203,7 @@ void put_ipc_ns(struct ipc_namespace *ns)
>  		mq_clear_sbinfo(ns);
>  		spin_unlock(&mq_lock);
>  
> +		ns_tree_remove(ns);
>  		if (llist_add(&ns->mnt_llist, &free_ipc_list))
>  			schedule_work(&free_ipc_work);
>  	}
> diff --git a/ipc/shm.c b/ipc/shm.c
> index a9310b6dbbc3..3db36773dd10 100644
> --- a/ipc/shm.c
> +++ b/ipc/shm.c
> @@ -45,6 +45,7 @@
>  #include <linux/mount.h>
>  #include <linux/ipc_namespace.h>
>  #include <linux/rhashtable.h>
> +#include <linux/nstree.h>
>  
>  #include <linux/uaccess.h>
>  
> @@ -148,6 +149,7 @@ void shm_exit_ns(struct ipc_namespace *ns)
>  static int __init ipc_ns_init(void)
>  {
>  	shm_init_ns(&init_ipc_ns);
> +	ns_tree_add(&init_ipc_ns);
>  	return 0;
>  }
>  
> 
> -- 
> 2.47.3
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ