All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Bobby Eshleman" <bobbyeshleman@meta.com>
Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
	virtualization@lists.linux.dev,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net-next v3 5/7] vsock/virtio: support guest device network namespace
Date: Mon, 12 Oct 2026 23:05:16 +0000	[thread overview]
Message-ID: <sashiko-outbox-168692@kernel.org> (raw)
In-Reply-To: <20261012-vsock-guest-ns-v3-5-b32447c66b23@meta.com>

> virtio-vsock did not have namespace support (the device was always
> accessible to any global namespace).
> 
> Make the virtio-vsock device assignable to a namespace and initialize it
> to init_net. Because virtio-vsock and init_net are both hardcoded to
> global mode, nothing changes until the assign command is issued.
> 
> An assign can land while virtio_transport_rx_work() is draining a
> batch, so the assigned namespace is re-read per packet rather than once
> per batch. Matching the rest of the batch against the namespace the
> device has left would reset connections that belong to the new one.
> 
> When a device is assigned to a namespace, every already established
> vsock socket that is no longer able to reach the device is forcibly
> closed. For that reason, adding new sockets to the connected table must
> be performed atomically with regards to namespace assignment. This
> ensures that when the socket is added to the connected table that it
> actually passes the new reachability conditions set by ns assignment. If
> it wins the race to the table and does NOT pass the reachability tests,
> then it will be reset. This is the purpose of the new helper
> 'vsock_maybe_set_connected()'.
> 
> Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261012-vsock-guest-ns-v3-0-b32447c66b23@meta.com?part=5


  reply	other threads:[~2026-10-12 23:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 22:48 [PATCH net-next v3 0/7] vsock: assign the guest vsock device to a network namespace Bobby Eshleman
2026-10-12 22:48 ` [PATCH net-next v3 1/7] vsock: constify the transport in vsock_for_each_connected_socket() Bobby Eshleman
2026-10-12 23:05   ` sashiko-bot
2026-10-12 22:48 ` [PATCH net-next v3 2/7] vsock: rename the vsock pernet operations Bobby Eshleman
2026-10-12 23:05   ` sashiko-bot
2026-10-12 22:48 ` [PATCH net-next v3 3/7] vsock: pass the netns to ->has_remote_cid() Bobby Eshleman
2026-10-12 23:05   ` sashiko-bot
2026-10-12 22:48 ` [PATCH net-next v3 4/7] vsock: add a netlink command to assign the g2h device to a netns Bobby Eshleman
2026-10-12 23:05   ` sashiko-bot
2026-10-13  1:44   ` Daniel Pereira
2026-10-13 17:34     ` Bobby Eshleman
2026-10-13 22:51   ` netdev-bot+sashiko
2026-10-12 22:48 ` [PATCH net-next v3 5/7] vsock/virtio: support guest device network namespace Bobby Eshleman
2026-10-12 23:05   ` sashiko-bot [this message]
2026-10-13 22:51   ` netdev-bot+sashiko
2026-10-12 22:48 ` [PATCH net-next v3 6/7] selftests/vsock: test the guest vsock " Bobby Eshleman
2026-10-12 23:05   ` sashiko-bot
2026-10-13 22:51   ` netdev-bot+sashiko
2026-10-12 22:48 ` [PATCH net-next v3 7/7] selftests/vsock: test the netns assign privilege checks Bobby Eshleman
2026-10-12 23:05   ` sashiko-bot
2026-10-13 22:52   ` netdev-bot+sashiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-168692@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bobbyeshleman@meta.com \
    --cc=eperezma@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.