🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8962

Re: [PATCH] ns: don't add init_ipc_ns and init_net without namespace support

#8962
From: Christian Brauner
Date: Fri, 30 Oct 2026 16:18
37 lines
9433 bytes
On Fri, 30 Oct 2026 16:50:07 +0100, Christian Brauner wrote:
> When CONFIG_IPC_NS or CONFIG_NET_NS are turned off we still add the
> initial ipc and network namespace to the namespace trees. ipc_ns_init()
> calls ns_tree_add(&init_ipc_ns) whenever CONFIG_SYSVIPC is set and
> setup_net() calls ns_tree_add_raw() on init_net whenever CONFIG_NET is
> set.
> 
> But without CONFIG_IPC_NS and CONFIG_NET_NS these aren't namespaces
> userspace can do anything with. They don't have proc_ns_operations so
> there's no /proc/<pid>/ns/{ipc,net} for them, nsfs_fh_to_dentry()
> refuses them with -EOPNOTSUPP, and since ns->ops is NULL
> __ns_tree_add_raw() doesn't add them to the owner list of init_user_ns
> either. So they end up half registered. That's also not how we treat
> any of the other namespace types. Without CONFIG_UTS_NS, CONFIG_PID_NS,
> CONFIG_TIME_NS or CONFIG_USER_NS the initial namespace is never added
> to the tree.
> 
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] ns: don't add init_ipc_ns and init_net without namespace support
      https://git.kernel.org/vfs/vfs/c/82f1c815aaef
Technical Details
Message-ID: <20261030-labil-bergab-besetzen-9a2b7d8d71ac@brauner>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353840-linux-kernel-netdev=dewy.ru
References: <20261030-work-nsfs-init_ns_tree-v1-1-7ec0adb47c54@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353840-linux-kernel-netdev=dewy.ru
From: brauner@kernel.org (Christian Brauner)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] ns: don't add init_ipc_ns and init_net without
 namespace support
Date: Fri, 30 Oct 2026 17:18:01 +0100
Organization: Usenet Network
Message-ID: <20261030-labil-bergab-besetzen-9a2b7d8d71ac@brauner>
References: <20261030-work-nsfs-init_ns_tree-v1-1-7ec0adb47c54@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2273512"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:V4OMF30rlyoHyU85n77H7WqJQ/E= sha256:2Uj3/yqg9DcKe4NX6iP39lDtBgJN+cTMgUTQw/zEzGM=
	sha1:LAwSthf6Eq0opmc6Oiz9NDw4mJo= sha256:uF9gG35DljU2/8ALjpfDm41i7DIxZWCDBByYOXz2vrc=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 3ABB9125CA3; Fri, 30 Oct 2026 19:21:52 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id DbwQQsiIEPRN;
	Fri, 30 Oct 2026 19:21:44 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353840-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id BD7F3125CA0; Fri, 30 Oct 2026 19:21:31 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id F2BD127858; Fri, 30 Oct 2026 16:18:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793377091;
	b=zOaLvWXiBVN1Km5NpwB1ioYsObToHwCPM27VRdq9eosU1rUcbOmrOzFuRKhz2CVdl+Av
	 mFf0IUy9BYwZ7M8ObdhFzI2iCqSSjrDjx5ly0RGmB8bB9bUDUUb97/nT3/8FnU0RKVLLO
	 fMq9Rt7mIdvXo/qwwtFXe7GRd3bwxkqR3kJY7FhGtaN9wHz4thsZTUGNE47lWK0kHbzvJ
	 zhhMDWUGvii0j2oT9fgPY6UwO4b7tXOnOeAlJ4fSQvCuqkYHAVMYqh5L8E//bOM5RB+w6
	 7E0gpKXV6JqqHSJDZPtb8GghQtUffjf7WvuNkTcmVht42CPgi4B2lly0i6W3EPsOrUA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793377091;
	h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:
	 In-Reply-To:References:Subject:Message-Id:Date:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding:
	 X-Mailer;
	bh=ZDNHG8v8zk9WmJP9GH0iqpZHJN79nd4ttmjK0fCFWyk=;
	b=Q0MUmm64qD1Kexr9zdXqcfMVTI/8x3sGUgj8umN2IJHgbJAQfjOOi8pu6SnTftSgoTXj
	 Csc8QnFn8c6SizMncbwFerm39QCD025dNrIMDHfX88FrivfdfI8eE/Kbh/pF7rSEwct/z
	 tuOewLedFFtvJ2ss1Dxe5yyr2WVL8FWnAHG4dqUB4fjWQg3RwG0FUGk7SM4m0uB6U46pO
	 xugh53ChBFIyDFOjYwW7sP+rOMhEk060LcyPOtRSGkoCO9BwHNY/DLfFiC7IvTbuMiFi4
	 aK0TJ2/K/g+ZZS2vzsVm0KMh439tjadANt4E1uteqCtcV1dciLGdHT3bkt3A7OBgx4w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=eWb9BuFd;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A1A0B606A327;
	Fri, 30 Oct 2026 16:18:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=eWb9BuFd
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793377085;
	b=E4rcz/85jlCWvPv4nWu1H9Ko3FnJCF3ZD8xbnOLjuwJJt1SPEMQjZWB7EYM2QmOfi8tc
	 HlHFqcsM6kF+2mnxcbeX9QFYgpELsUvrwzt6a03n0hCSS+46UiyRRwHf8LNv67oKCzLOm
	 jkAvC/U6R/5M3xunRQPuXoEFAkkwgu4fh3ffbMYvvRZF7HtMzF3xeBcb3gSeKEh+9DWSD
	 aY69c9bRYwXpw8+B1yEMWDsxeCzzhVfPhICRL+csS8SqE/D9tA9HqQUf0sfwx9fZy3fp3
	 wafdEnunj+GoMXq9VYSPvBiYasZgpDzuNbTI4o6eYwG4wCWd/1Hj9zXXPblD4vmrQMQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793377085;
	h=Received:DKIM-Signature:From:To:Cc:In-Reply-To:References:Subject:
	 Message-Id:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:
	 X-Mailer;
	bh=ZDNHG8v8zk9WmJP9GH0iqpZHJN79nd4ttmjK0fCFWyk=;
	b=g+oShhIcx4+U1ExFeVr5j6GsJYo/5175aWY+N0Qql8HHioXVHRwHEe3iC84M4dfssZda
	 obYJcr917EMqxlx8qpQK2gz6Zg5gbf8u7+NRPVn+gQRKKkC8jFP8TDYs66i/b3FVd6OOU
	 lkvemoU/loolHnqTI8unhr/CfvAuZl5x0EOfZ/eoGX4/i64ACe/9adlGB46m0abNEI9qz
	 DmPAq0jZQF447eAu80uooril0wVtnabXyr1Px44juFCSIu7WFcAYsP6yymM0vRlMsXjCz
	 YohpH8YBaKYFUXPqp0Z7xwbc+qQE9YZzTh+sMbj0g4yHl9vqfhYqGu9+Lvj9pjBAPeQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=eWb9BuFd;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A3F3606A31C;
	Fri, 30 Oct 2026 16:18:05 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85BF71F000C1;
	Fri, 30 Oct 2026 16:18:03 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793377084;
	bh=ZDNHG8v8zk9WmJP9GH0iqpZHJN79nd4ttmjK0fCFWyk=;
	h=From:To:Cc:In-Reply-To:References:Subject:Date;
	b=eWb9BuFdkxI1AoMZhA1RbZq7J/sUlQ18FiCmi5ShQw/WYHUb+y+CeSsSuuZqY26lW
	 1/nv4TeLqKesyblsRXZpbD+xxPtpMZj5VfWLthnZjuelUmKZlEQu6WEnqvU/yEuZPG
	 aJx/6bdO3sgrCSwaR2sTbIj1xu8miLdFRL6KAq72+SLi9OtLq3ycFHm/W1+MWoETdf
	 BiZ2FQ8ok2GAmsmOv+By3+V63Vc88VU4ZRLqt/IvLJTXfIcpn8LAi97b1WifL7prbi
	 9YPywOmhwxgnttRnNAMgV7KKwYeJOg7i6Zynast3R7X0DeM7v3UVU1gEpneK8Op02b
	 N5ACo2z7m2LwA==
X-Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, 
 kernel test robot <yi1.lai@intel.com>, stable@vger.kernel.org
X-In-Reply-To: <20261030-work-nsfs-init_ns_tree-v1-1-7ec0adb47c54@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Mailer: b4 0.17-dev-ce4c1