Linux vsock (for VMCI based transport) driver features and bug fixes
search cancel

Linux vsock (for VMCI based transport) driver features and bug fixes

book

Article ID: 313782

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides a summary of the important features and bug fixes implemented in the Linux vsock drivers (vsock.ko and vmw_vsock_vmci_transport.ko) contributed to the upstream Linux kernel.

Resolution

Changes implemented by Linux kernel versions:

5.19

  1. f4b41f062c424209e3939a81e6da022e049a45f2 ("net: remove noblock parameter from skb_recv_datagram()")

5.17

  1. 8e6ed963763fe21429eabfc76c69ce2b0163a3dd ("vsock: each transport cycles only on its own sockets")
  2. b9208492fcaecff8f43915529ae34b3bcb03877c ("vsock: remove vsock from connected table when connect is interrupted by a signal")
  3. e63a02348958cd7cc8c8401c94de57ad97b5d06c ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next")
  4. b6459415b384cb829f0b2a4268f211c789f6cf0b ("net: Don't include filter.h from net/sock.h")

5.16

  1. c7cd82b90599fa10915f41e3dd9098a77d0aa7b6 ("vsock: prevent unnecessary refcnt inc for nonblocking connect")
  2. 4c1e34c0dbffb17accdfe16ac97ab432df9024ff ("vsock: Enable y2038 safe timeval for timeout")
  3. 685c3f2fba298458865ade3bb310c5ddddef87f0 ("vsock: Refactor vsock_*_getsockopt to resemble sock_getsockopt")

5.15

  1. 8fc92b7c15f04fb50ce414cbeba7b326e07fcf86 ("af_vsock: rename variables in receive loop")

5.14

  1. dbe69e43372212527abf48609aba7fc39a6daa27 ("Merge tag 'net-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next")
  2. b6df00789e2831fff7a2c65aa7164b2a4dcbe599 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
  3. e3ae2365efc14269170a6326477e669332271ab3 ("net: sock: introduce sk_error_report")
  4. c7ff9cff70601ea19245d997bb977344663434c7 ("vsock: notify server to shutdown when client has pending signal")
  5. 0de5b2e67275695d6ad7369c594feb1578f891fd ("vsock: rename vsock_wait_data()")
  6. cc97141afd768d36eaef1b3e1afea2a74da7df27 ("vsock: rename vsock_has_data()")
  7. 8cb48554ad822fb8553380b4781ea65f1e3ca7bb ("af_vsock: update comments for stream sockets")
  8. 0798e78b102b79ed9fe4b2beeb18cf0db117c79b ("af_vsock: rest of SEQPACKET support")
  9. fbe70c480796d9052fcc786c76e6b029acb1c7bc ("af_vsock: implement send logic for SEQPACKET")
  10. 9942c192b256bc11cc903f89f4057bc97434dee9 ("af_vsock: implement SEQPACKET receive loop")
  11. 19c1b90e1979c3974cd6a3ec0cbb886a84278d84 ("af_vsock: separate receive data loop")
  12. b3f7fd54881bcba5dc529935f38df649167803b1 ("af_vsock: separate wait data loop")
  13. a9e29e5511b9e68b64e9031edb7b7f8920ad3de1 ("af_vsock: update functions for connectible socket")
  14. 268551503d66dc0a266fe6034c84a31ab4f3edf7 ("vsock/vmci: remove the repeated word "be"")

5.13

  1. f0a5818b472c574a985cfeb6518a5ba395f26b3c ("vsock/vmci: Remove redundant assignment to err")
  2. 6876a18d3361e1893187970e1881a1d88d894d3f ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
  3. e16edc99d658cd41c60a44cc14d170697aa3271f ("vsock/vmci: log once the failed queue pair allocation")
  4. 9195f06b2d0fd0d1cc1552970d890c21f6b9492f ("net: vsock: Fix a typo")

5.12

  1. 1f935e8e72ec28dddb2dc0650b3b6626a293d94b ("selinux: vsock: Set SID for socket returned by accept()")

5.11

  1. 1c5fae9c9a092574398a17facc31c533791ef232 ("vsock: fix locking in vsock_shutdown()")
  2. 3d0bc44d39bca615b72637e340317b7899b7f911 ("net/vmw_vsock: improve locking in vsock_connect_timeout()")
  3. 5d1cbcc990f18edaddddef26677073c4e6fad7b7 ("net/vmw_vsock: fix NULL pointer dereference")
  4. c518adafa39f37858697ac9309c6cf1805581446 ("vsock: fix the race conditions in multi-transport support")
  5. 7f816984f439dfe24da25032254cb10512900346 ("af_vsock: Assign the vsock transport considering the vsock address flags")
  6. 1b5f2ab98e7f99f1a83960b17c5596012a7c5e88 ("af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path")
  7. cada7ccd9dc75fc73de9342ae1dd0374e8fb1056 ("vsock_addr: Check for supported flag values")
  8. 56495a2442a47d0ea752db62434913b3346fe5a5 ("Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
  9. c3e448cdc04071d1c420e7da87bafff22022a675 ("vsock: fix the error return when an invalid ioctl command is used")
  10. 6bc8f20c1d9348bdf9ce387228c1b16ce4a301ad ("vsock: remove ratelimit unknown ioctl message")

5.10

  1. 65b422d9b61ba12c08150784e8012fa1892ad03e ("vsock: forward all packets to the host when no H2G is registered")
  2. af545bb5ee53f5261db631db2ac4cde54038bdaf ("vsock: use ns_capable_noaudit() on socket create")

5.9

  1. 1980c05844830a44708c98c96d600833aa3fae08 ("vsock: fix potential null pointer dereference in vsock_poll()")
  2. a7b75c5a8c41445f33efb663887ff5f5c3b4454b ("net: pass a sockptr_t into ->setsockopt")
  3. a44d9e72100f7044ac46e4e6dc475f5b4097830f ("net: make ->{get,set}sockopt in proto_ops optional")

5.8

  1. fdb4276aae1100aa13f955eff6c944a8200a15ac ("vsock/vmci: make vmci_vsock_transport_cb() static")

5.7

  1. 7e0afbdfd13d1e708fe96e31c46c4897101a6a43 ("vsock: fix timeout in vsock_accept()")
  2. 9f6e055907362f6692185c1c9658295d24095c74 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")

5.6

  1. 3f74957fcbeab703297ed0f135430414ed7e0dd0 ("vsock: fix potential deadlock in transport->release()")

5.5

  1. 039fcccaed338b2ff6587178c1219c1ef383a1d9 ("vsock: avoid to assign transport if its initialization fails")
  2. 36c5b48b91ac56762ef87e4af76350ed50f119b5 ("vsock: fix bind() behaviour taking care of CID")
  3. 6a2c0962105ae8ceba182c4f616e0e41d7755591 ("vsock: prevent transport modules unloading")
  4. b1bba80a4376aef34de2b57bfb8834bd095703ed ("vsock/vmci: register vmci_transport only when VMCI guest/host are active")
  5. c0cfa2d8a788fcf45df5bf4070ab2474c88d543a ("vsock: add multi-transports support")
  6. 55f3e149b69004b95be47c891da50327ea8c0eb4 ("vsock: move vsock_insert_unbound() in the vsock_create()")
  7. b9ca2f5ff7784d46285a8f1b14419ac4645096f7 ("vsock: add vsock_create_connected() called by transports")
  8. b9f2b0ffde0c9b666b2b1672eb468b8f805a9b97 ("vsock: handle buffer_size sockopts in the core")
  9. daabfbca34ecfa936d3bf5219167c4c5e67db150 ("vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()")
  10. fe502c4a38d97e5f8b9d5602af1f07f5abc529d2 ("vsock: add 'transport' member in the struct vsock_sock")
  11. 3603a2e991a82e5094c3107a792859b08342aed3 ("vsock: remove include/linux/vm_sockets.h file")
  12. db205c766862edae48d64e69e2f2502e2a3e9135 ("vsock: remove vm_sockets_get_local_cid()")
  13. 7ed78bc495fda7c1e79b85c3ab0f240685afcc80 ("vsock/vmci: remove unused VSOCK_DEFAULT_CONNECT_TIMEOUT")
  14. 7976a11b30929871a4c84c3c406d7681a3dbcc10 ("net: use helpers to change sk_ack_backlog")
  15. 3b7ad08b5153b0eda2f4d57ac53d815c30acd172 ("vsock: Simplify '__vsock_release()'")
  16. d31e95585ca697fb31440c6fe30113adc85ecfbd ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
  17. 2f184393e0c2d409c62262f57f2a57efdf9370b8 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")

5.4

  1. 3ef7cf57c72f32f61e97f8fa401bc39ea1f1a5d4 ("net: use skb_queue_empty_lockless() in poll() handlers")
  2. 0d9138ffac24cf8b75366ede3a68c951e6dcc575 ("vsock: Fix a lockdep warning in __vsock_release()")

5.3

  1. d5afa82c977ea06f7119058fa0eb8519ea501031 ("vsock: correct removal of socket from the list")
5.2
  1. 685a6bf8485e6319c4dd070c02491f9163c23083 ("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321")
  2. ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1 ("treewide: Add SPDX license identifier - Makefile/Kconfig")
  3. 2c1212de6f9794a7becba5f219fa6ce8a8222c90 ("Merge tag 'spdx-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core")

5.1

  1. 3313da8188cc346a205783c22c37e821b4b7016d ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
  2. fe0c72f3db11be752e7c06efad9fa27af1327c47 ("socket: move compat timeout handling into sock.c")
  3. a22d3251423f94935e06644cfbf4caa5141e89cb ("Fix ERROR:do not initialise statics to 0 in af_vsock.c")

5.0

  1. 225d9464268599a5b4d094d02ec17808e44c7553 ("vsock: cope with memory allocation failure at socket creation time")

4.20

  1. a915b982d8f5e4295f64b8dd37ce753874867e88 ("VSOCK: Send reset control packet when socket is partially bound")
  2. 8236b08cf50f85bbfaf48910a0b3ee68318b7c4b ("VSOCK: bind to random port for VMADDR_PORT_ANY")

4.18

  1. 455f05ecd2b219e9a216050796d30c830d9bc393 ("vsock: split dwork to avoid reinitializations")
  2. a11e1d432b51f63ba698d044441284a661f01144 ("Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL")
  3. 31f50b557318d787474a28c3e075f518cdcb5278 ("net/vmw_vsock: convert to ->poll_mask")

4.17

  1. 05e489b1596f0aa1025a1fa572676631cd9665da ("VSOCK: make af_vsock.ko removable again")
  2. 9b2c45d479d0fb8647c9e83359df69162b5fbe5f ("net: make getname() functions return length rather than use int* parameter")

4.16

  1. a9a08845e9acbd224e4ee466f5c1275ed50054e8 ("vfs: do bulk POLL* -> EPOLL* replacement")
  2. 168fe32a072a4b8dc81a3aebf0e5e588d38e2955 ("Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs")

4.15

  1. ba3169fc7548759be986b168d662e0ba64c2fd88 ("VSOCK: set POLLOUT | POLLWRNORM for TCP_CLOSING")
  2. c9d3fe9da094a9a7a3d3cd365b334b822e05f5e8 ("VSOCK: fix outdated sk_state value in hvs_release()")
  3. 4a5def7f6a758aef1a0a3b10e981881c1e914f69 ("VSOCK: Don't set sk_state to TCP_CLOSE before testing it")
  4. ade994f4f6c8c3ef4c3bfc2d02166262fb9d089c ("net: annotate ->poll() instances")
  5. afbea2cd253b5198350dfd8edb963567d05827d6 ("VSOCK: Don't call vsock_stream_has_data in atomic context")
  6. 2a171788ba7bb61995e98e8163204fc7880f63b2 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
  7. c1eef220c1760762753b602c382127bfccee226d ("vsock: always call vsock_init_tables()")
  8. 413a4317aca7d6367d57a5971b0c461f03851207 ("VSOCK: add sock_diag interface")
  9. 3b4477d2dcf2709d0be89e2a8dced3d0f4a017f2 ("VSOCK: use TCP state constants for sk_state")
  10. bf359b8127719535f88494adb3c2b73c06667dcd ("VSOCK: move __vsock_in_bound/connected_table() to af_vsock.h")
  11. 44f209807ee87a5eddf6c0432f3fb63cec27bad8 ("VSOCK: export socket tables for sock_diag interface")
  12. 173f4c5ebbd803023e42799d956cf174dea92db5 ("vsock: vmci: Remove unneeded linux/miscdevice.h include")

4.14

  1. b24413180f5600bcb3bb70fbed5cf186b60864bd ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license"

4.13

  1. b952f4dff2751252db073c27c0f8a16a416a2ddc ("net: manual clean code which call skb_put_[data:zero]")
  2. 4df864c1d9afb46e2461a9f808d9f11a42d31bad ("networking: make skb_put & friends return void pointers")
  3. 59ae1d127ac0ae404baf414c434ba2651b793f46 ("networking: introduce and use skb_put_data()")

4.12

  1. 499fde662f1957e3cb8d192a94a099ebe19c714b ("vsock: use new wait API for vsock_stream_sendmsg()")
  2. ed8bfd5c1ca6e2911c797da611fdada958ab44c0 ("VSOCK: remove unnecessary ternary operator on return value")

4.11

  1. 380feae0def7e6a115124a3219c3ec9b654dca32 ("vsock: cancel packets when failing to connect")
  2. 36d277bac8080202684e67162ebb157f16631581 ("vsock: track pkt owner vsock")
  3. cdfbabfb2f0ce983fdaa42f20e5f7842178fc01e ("net: Work around lockdep limitation in sockets that use sockets")
  4. 1827adb11ad26b2290dc9fe2aaf54976b2439865 ("Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
  5. 174cd4b1e5fbd0d74c68cf3a74f5bd4923485512 ("sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>")

4.10

  1. 52f40e9d657cc126b766304a5dd58ad73b02ff46 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
  2. 99a5e178bde4b0fa1f25ca8d9caee0cb5e329e7c ("ATM: use designated initializers")
  3. d9dc8b0f8b4ec8cdc48ad5a20a3105387138be82 ("net: fix sleeping for sk_wait_event()")

4.8

  1. 1190cfdb1a19d89561ae51cff7d9c2ead24b3ebe ("VSOCK: Don't dec ack backlog twice for rejected connections")
  2. 6773b7dc39f165bd9d824b50ac52cbb3f87d53c8 ("VSOCK: defer sock removal to transports")
  3. 0b01aeb3d2fbf16787f0c9629f4ca52ae792f732 ("VSOCK: transport-specific vsock_transport functions")

4.7

  1. 4192f672fae559f32d82de72a677701853cc98a7 ("vsock: make listener child lock ordering explicit")
  2. e800072c18f0d7b89a80fa46dceb3d080c80e09c ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
  3. 56130915bbe31656c80f7493d28536693f8de0e2 ("VSOCK: constify vsock_transport structure")

4.6

  1. dedc58e067d8c379a15a8a183c5db318201295bb ("VSOCK: do not disconnect socket when peer has shutdown SEND only")
  2. 9c995cc9a206a008699da82f6cd01e9b2615649a ("VSOCK: Only check error on skb_recv_datagram when skb is NULL")
  3. 8ab18d71de8b07d2c4d6f984b718418c09ea45c5 ("VSOCK: Detach QP check should filter out non matching QPs.")
  4. f7f9b5e7f8eccfd68ffa7b8d74b07c478bb9e7f0 ("AF_VSOCK: Shrink the area influenced by prepare_to_wait")
  5. 6f57e56a1527d58264ae126eff94fdac067744fc ("Revert "vsock: Fix blocking ops call in prepare_to_wait"")

4.5

  1. 5988818008257ca42010d6b43a3e0e48afec9898 ("vsock: Fix blocking ops call in prepare_to_wait")
  2. 357ab2234d57f6c74386f64ded42dff8e3c0500b ("VSOCK: Introduce vsock_find_unbound_socket and vsock_bind_dgram_generic")
  3. 3b22dae38db1cea9ead3229f08cfb0b69aca5706 ("VSOCK: constify vmci_transport_notify_ops structures")

4.4

  1. 7362945aea72fccc9df4f4e7643c971e0a8c33dc ("VSOCK: call sk->sk_data_ready() on accept()")
  2. ea3803c193df18d8353d6c8d77034066a08c19f5 ("VSOCK: define VSOCK_SS_LISTEN once only")

4.3

  1. 8566b86ab9f0f45bc6f7dd422b21de9d0cf5415a ("VSOCK: Fix lockdep issue.")
  2. 4ef7ea9195ea73262cd9730fb54e1eb726da157b ("VSOCK: sock_put wasn't safe to call in interrupt context")
  3. f6a835bb04ca34b6fd337eea0544a871ba2349b8 ("vsock: fix missing cleanup when misc_register failed")

4.2

  1. 11aa9c28b4209242a9de0a661a7b3405adb568a0 ("net: Pass kern from net_proto_family.create to sk_alloc")

4.1

  1. 1b784140474e4fc94281a49e96c67d29df0efbde ("net: Remove iocb argument from sendmsg and recvmsg")

4.0

  1. 4c946d9c11d173c2ea6b9081b248f8072e6b46f1 ("vmci: propagate msghdr all way down to __qp_memcpy_to_queue()")

3.19

  1. c0371da6047abd261bc483c744dbc7d81a116172 ("put iov_iter into msghdr")
  2. d838df2e5dcbb6ed4d82854869e9a30f9aeef6da ("vmci: propagate msghdr all way down to __qp_memcpy_from_queue()")
  3. 0f7db23a07af5de22940f08c3f88a0741d4df0bc ("vmci_transport: switch ->enqeue_dgram, ->enqueue_stream and ->dequeue_stream to msghdr")
  4. 51f3d02b980a338cd291d2bc7629cdfb2568424b ("net: Add and use skb_copy_datagram_msg() helper.")

3.15

  1. 2c4a336e0a3e203fab6aa8d8f7bb70a0ad968a6b ("vsock: Make transport the proto owner")
  2. 676d23690fb62b5d51ba5d659935e9f7d9da9f8e ("net: Fix use after free by removing length arg from sk_data_ready callbacks.")

3.14

  1. 342dfc306fb32155314dad277f3c3686b83fb9f1 ("net: add build-time checks for msg->msg_name size")
3.13
  1. f3d3342602f8bcbf37d7c46641cb9bca7618eb1c ("net: rework recvmsg handler msg_name and msg_namelen logic")
  2. 8c88126bbbb1c1e6c499fb3c211dba93656f02b5 ("treewide: Fix typo in Kconfig")

3.12

  1. 2ff1cf12c9fe70e75e600404e6a4274b19d293ed ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
  2. 82a54d0ebbee03a8dcf4e1e4016a53fed4d6c933 ("VSOCK: Move af_vsock.h and vsock_addr.h to include/net")

3.11

  1. d9af2d67e490b48f0d36f448d34e7bab9425f142 ("net/vmw_vsock/af_vsock.c: drop unneeded semicolon")
  2. a49dd9dcb50195b35a5e59eb65b8e56584874630 ("VSOCK: Fix VSOCK_HASH and VSOCK_CONN_HASH")
  3. 0fc932467688e1c81fc109a93f323cef4993dc24 ("VSOCK: Remove unnecessary label")
  4. dce1a2877778fee172ab74411fcabd77bceb8e12 ("VSOCK: Return VMCI_ERROR_NO_MEM when fails to allocate skb")
  5. b3a6dfe8178c5159e54117078134fef806a913ca ("VSOCK: Introduce vsock_auto_bind helper")

3.10

  1. 58717686cf7c7f5a70b3a8907ade8a3ce74306b1 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
  2. 22ee3b57c3ff71772b0c4178404b04f5df78d501 ("VSOCK: Drop bogus __init annotation from vsock_init_tables()")
  3. 6ad0b2f7fdfd95fe3107367f8aed252e94c3f654 ("VSOCK: Fix misc device registration")
  4. d978a6361ad13f1f9694fcb7b5852d253a544d92 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
  5. d66248326410ed0d3e813ebe974b3e6638df0717 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
  6. 2a89f9247ae43a2cf36fbc07b21b5792fc7b9efe ("VSOCK: Support VM sockets connected to the hypervisor.")

3.9

  1. d5e0d0f607a7a029c6563a0470d88255c89a8d11 ("VSOCK: Fix missing msg_namelen update in vsock_stream_recvmsg()")
  2. 680d04e0ba7e926233e3b9cee59125ce181f66ba ("VSOCK: vmci - fix possible info leak in vmci_transport_dgram_dequeue()")
  3. 990454b5a48babde44a23c0f22bae5523f4fdf13 ("VSOCK: Handle changes to the VMCI context ID.")
  4. 6cf1c5fc26c6507bcb0edced6fcda876a79b5a6d ("VSOCK: Don't reject PF_VSOCK protocol")
  5. 7ccd7de691bcc7194deb68b1db391861ada5427e ("VSOCK: get rid of vsock_version.h")
  6. 7777ac3860327da557665f6e53cd82fbe40f151b ("VSOCK: get rid of EXPORT_SYMTAB")
  7. d021c344051af91f42c5ba9fdedc176740cbd238 ("VSOCK: Introduce VM Sockets")