From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f54.google.com (mail-yx1-f54.google.com [74.125.224.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73D3232C8B for ; Thu, 8 Jan 2026 00:41:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767832897; cv=none; b=ZuLRM2BTccwCDBym0ijP0Uns59Pl68/0BspLm3m+8kF/mqD9vr+++4cqpFxoFRdeFZT0x/6oItzh40y2IFb3gMpFX6kbFJK6nLP9rY8PJ83emwWk5xX6WfaVMLPmobKQDdp1pG2eFlwDrW65xAvSdEx8jCrq1yHpbaXQa+NY5NM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767832897; c=relaxed/simple; bh=9g0zStzKQeS3+N9tmIKzZx3owOLSnCnzmMh7XbFrzQk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LltaebGkNIrdQWW4+xfZp8YZ6siST89ze2MqnVHm+FzBj8K+5ILtMr/zXB4o6hj1R7dAEOAy81Y6Tpmyw0eu1HmQ5/Ed07z9Za30by9Prp5vy+z34YQ32GX8WODdtE1htz7CgwKRma4B4rY32ePJBNhLl0QMtq4vK8uNX8SKYw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lh9AaWzp; arc=none smtp.client-ip=74.125.224.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lh9AaWzp" Received: by mail-yx1-f54.google.com with SMTP id 956f58d0204a3-6467ac59e16so2077090d50.1 for ; Wed, 07 Jan 2026 16:41:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767832894; x=1768437694; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jrenqTp8E4tDkOgXs7eMnB0GiU20rX+sxdLI3fByfBk=; b=lh9AaWzpXnlVl9nZXhJnRo0Y8K1o7eo2v3zX9HTdB/EjYm4atY/VsyMe8GBBfbdxL1 MH0hMkuVOfYpgXKVnTBj6/tNewFC5wUaq7Y+9Z7k53yeBjrUkRjtqnV/qY11zl5ug2O7 wksu4fd3gdNwP2DyBS+s0qtIz23y537d3e48wcy0dIkAHfs1mWrl71c2BdRIOTnhlBM0 3LUvbvAQeGxsSW5jzPmATnyHTDyZ7308bcJtphsqX/8whzHOmvCwqK5YrxPR0t56ZApx TNA2JYT8nFglk8yG3BOIo9fYFE+zk7fZdx1PBltKZpeEN8iCcJbzVO5VNZPmLfds9L97 uxnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767832894; x=1768437694; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jrenqTp8E4tDkOgXs7eMnB0GiU20rX+sxdLI3fByfBk=; b=sIVBIz6CGbQyhiMYLpjUE91+xIFG55FFW30X51h0rkMJ/1u0LlEsbhkZsnBYS1wC/6 7rlD+jPm2Pxm/lmQ8gFUT/IxhZmVpT2GfaJQez2cR5ArDBiTR+8ivnewDgK+unG9apOS 3A885xwxfr0dt+sxXYWEUzy4wNYDPi1bRQsUIa4qTnFsQK1dWTxN6KjNo66PVgAW55La 0714N1kIjRhoH2Uz2++SC7isNbfligvnF5I8PrTREzJhhrFWEMxDin2KcFFxeEUEe+/m uAF4EBbTc8ytArg5/CU6VPgrEIXhaBacutSQoyj8VnkFbi224h7BVt4eHm6lYu6jUOaP Ikdw== X-Forwarded-Encrypted: i=1; AJvYcCXDB/F0XLOJgJtfjg6IkvtNfQD0NB6e48eOrqN7XBZEjT69ap5DdtdX8kY3jdaAte6K2laEDJuJtGdmWLc=@vger.kernel.org X-Gm-Message-State: AOJu0YznABcakCMolWsWmcqrpthT3bBuCrqrYcKoyMX9Wufgf5uZckOK rFwvrkCGL5dtD5kx3tUmJ/ymgYuVE5QW16uiVjfiBtSHYkJKAlQlUZ1r X-Gm-Gg: AY/fxX6I8oEINEbC3K3s72dtkqzP2YguiZPL2kqT1RzMmlc7cCQb+ZcGDF52wmaKxCz R9HY4ZLNm/4wwS1Xad5DjGh4vd2uDt7WYZmTqVY2VU+1x8xQyuLAfUw+VZIzIuBmnNVoHlpDZEv FUw+zHWUe/0PxpKqrlVFy/tFW7uN4465lzcQbOo0TKRM1jgiVk7CgUh9CIVvZsMlEi9DrtgOXK9 OW2CqeZMbQEfKCGjs4WCyOUC0TwHbYuTqK+/KQStmhUJLgkh/r1tXJoJroClxjpYdZ5nyr6Blj0 ggIZzOz8gqkLLcypQ/v0LOTDB+4FCe3dbiVX82ehy9nEVo4Av60Iz5+YdVWRsQneB9jkjRRf79N /zdjF03/GCeMzujYzdCjh/e6Bf4Zrg3uu1VwmsL1ZeIcELvgYdQakkhFIzmA7XYGpapOieAWc0L tAz7ujg+qqaxnISd0I2VJ2+AWIJEeotyl2DNf8mnt39QY8Ng== X-Google-Smtp-Source: AGHT+IEnrEIlaG9p2xZXsCNaxYstFtQuumuk05m95Q+1JCx1iT0A6+p+K9E6BdjxZvhkaj4OdW4EFA== X-Received: by 2002:a05:690e:1686:b0:644:60d9:8675 with SMTP id 956f58d0204a3-64716cbfa9fmr3525112d50.90.1767832894483; Wed, 07 Jan 2026 16:41:34 -0800 (PST) Received: from devvm11784.nha0.facebook.com ([2a03:2880:25ff:42::]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-6470d89d607sm2690822d50.12.2026.01.07.16.41.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 16:41:33 -0800 (PST) Date: Wed, 7 Jan 2026 16:41:32 -0800 From: Bobby Eshleman To: Paolo Abeni Cc: Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Simon Horman , Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , Eugenio =?iso-8859-1?Q?P=E9rez?= , Xuan Zhuo , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Bryan Tan , Vishnu Dasa , Broadcom internal kernel review list , Shuah Khan , linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, netdev@vger.kernel.org, kvm@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kselftest@vger.kernel.org, berrange@redhat.com, Sargun Dhillon , Bobby Eshleman Subject: Re: [PATCH net-next v12 04/12] vsock: add netns support to virtio transports Message-ID: References: <20251126-vsock-vmtest-v12-0-257ee21cd5de@meta.com> <20251126-vsock-vmtest-v12-4-257ee21cd5de@meta.com> <6cef5a68-375a-4bb6-84f8-fccc00cf7162@redhat.com> <06b7cfea-d366-44f7-943e-087ead2f25c2@redhat.com> <99b6f3f7-4130-436a-bfef-3ef35832e02c@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99b6f3f7-4130-436a-bfef-3ef35832e02c@redhat.com> On Wed, Jan 07, 2026 at 10:47:56AM +0100, Paolo Abeni wrote: > Hi, > > On 12/2/25 11:01 PM, Bobby Eshleman wrote: > > On Tue, Dec 02, 2025 at 09:47:19PM +0100, Paolo Abeni wrote: > >> I still have some concern WRT the dynamic mode change after netns > >> creation. I fear some 'unsolvable' (or very hard to solve) race I can't > >> see now. A tcp_child_ehash_entries-like model will avoid completely the > >> issue, but I understand it would be a significant change over the > >> current status. > >> > >> "Luckily" the merge window is on us and we have some time to discuss. Do > >> you have a specific use-case for the ability to change the netns mode > >> after creation? > >> > >> /P > > > > I don't think there is a hard requirement that the mode be change-able > > after creation. Though I'd love to avoid such a big change... or at > > least leave unchanged as much of what we've already reviewed as > > possible. > > > > In the scheme of defining the mode at creation and following the > > tcp_child_ehash_entries-ish model, what I'm imagining is: > > - /proc/sys/net/vsock/child_ns_mode can be set to "local" or "global" > > - /proc/sys/net/vsock/child_ns_mode is not immutable, can change any > > number of times > > > > - when a netns is created, the new netns mode is inherited from > > child_ns_mode, being assigned using something like: > > > > net->vsock.ns_mode = > > get_net_ns_by_pid(current->pid)->child_ns_mode > > > > - /proc/sys/net/vsock/ns_mode queries the current mode, returning > > "local" or "global", returning value of net->vsock.ns_mode > > - /proc/sys/net/vsock/ns_mode and net->vsock.ns_mode are immutable and > > reject writes > > > > Does that align with what you have in mind? > Sorry for the latency. This fell of my radar while I still processed PW > before EoY and afterwards I had some break. > > Yes, the above aligns with what I suggested, and I think it should solve > possible race-related concerns (but I haven't looked at the RFC). > > /P > > No worries, understandable! Thanks for the confirmation. Best, Bobby