]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag
authorAndra Paraschiv <andraprs@amazon.com>
Mon, 14 Dec 2020 16:11:19 +0000 (18:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:27:52 +0000 (18:27 +0200)
commit29dbdd234b2c67a467c74ef45dc7dc7557107650
treedcf22e43be717df16965ffa4e194d8dbb5c150ca
parent40e6fbd09c0de28ebbb0979420eee59892af18bd
vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag

[ Upstream commit caaf95e0f23f9ed240b02251aab0f6fdb652b33d ]

Add VMADDR_FLAG_TO_HOST vsock flag that is used to setup a vsock
connection where all the packets are forwarded to the host.

Then, using this type of vsock channel, vsock communication between
sibling VMs can be built on top of it.

Changelog

v3 -> v4

* Update the "VMADDR_FLAG_TO_HOST" value, as the size of the field has
  been updated to 1 byte.

v2 -> v3

* Update comments to mention when the flag is set in the connect and
  listen paths.

v1 -> v2

* New patch in v2, it was split from the first patch in the series.
* Remove the default value for the vsock flags field.
* Update the naming for the vsock flag to "VMADDR_FLAG_TO_HOST".

Signed-off-by: Andra Paraschiv <andraprs@amazon.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 687aa0c5581b ("vsock: Fix transport_* TOCTOU")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/uapi/linux/vm_sockets.h