<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/net/vmw_vsock, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/net/vmw_vsock?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/net/vmw_vsock?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-11-03T09:49:29Z</updated>
<entry>
<title>vsock: fix possible infinite sleep in vsock_connectible_wait_data()</title>
<updated>2022-11-03T09:49:29Z</updated>
<author>
<name>Dexuan Cui</name>
<email>decui@microsoft.com</email>
</author>
<published>2022-11-01T02:17:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=466a85336fee6e3b35eb97b8405a28302fd25809'/>
<id>urn:sha1:466a85336fee6e3b35eb97b8405a28302fd25809</id>
<content type='text'>
Currently vsock_connectible_has_data() may miss a wakeup operation
between vsock_connectible_has_data() == 0 and the prepare_to_wait().

Fix the race by adding the process to the wait queue before checking
vsock_connectible_has_data().

Fixes: b3f7fd54881b ("af_vsock: separate wait data loop")
Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reported-by: Frédéric Dalleau &lt;frederic.dalleau@docker.com&gt;
Tested-by: Frédéric Dalleau &lt;frederic.dalleau@docker.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>vsock: remove the unused 'wait' in vsock_connectible_recvmsg()</title>
<updated>2022-11-03T09:49:29Z</updated>
<author>
<name>Dexuan Cui</name>
<email>decui@microsoft.com</email>
</author>
<published>2022-11-01T02:17:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cf6ff0df0fd123493e57278a1bd4414a97511a34'/>
<id>urn:sha1:cf6ff0df0fd123493e57278a1bd4414a97511a34</id>
<content type='text'>
Remove the unused variable introduced by 19c1b90e1979.

Fixes: 19c1b90e1979 ("af_vsock: separate receive data loop")
Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2022-10-04T00:44:18Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-10-04T00:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e52f7c1ddf3e47243c330923ea764e7ccfbe99f7'/>
<id>urn:sha1:e52f7c1ddf3e47243c330923ea764e7ccfbe99f7</id>
<content type='text'>
Merge in the left-over fixes before the net-next pull-request.

Conflicts:

drivers/net/ethernet/mediatek/mtk_ppe.c
  ae3ed15da588 ("net: ethernet: mtk_eth_soc: fix state in __mtk_foe_entry_clear")
  9d8cb4c096ab ("net: ethernet: mtk_eth_soc: add foe_entry_size to mtk_eth_soc")
https://lore.kernel.org/all/6cb6893b-4921-a068-4c30-1109795110bb@tessares.net/

kernel/bpf/helpers.c
  8addbfc7b308 ("bpf: Gate dynptr API behind CAP_BPF")
  5679ff2f138f ("bpf: Move bpf_loop and bpf_for_each_map_elem under CAP_BPF")
  8a67f2de9b1d ("bpf: expose bpf_strtol and bpf_strtoul to all program types")
https://lore.kernel.org/all/20221003201957.13149-1-daniel@iogearbox.net/

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>vhost/vsock: Use kvmalloc/kvfree for larger packets.</title>
<updated>2022-09-30T01:34:08Z</updated>
<author>
<name>Junichi Uekawa</name>
<email>uekawa@chromium.org</email>
</author>
<published>2022-09-28T06:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0e3f72931fc47bb81686020cc643cde5d9cd0bb8'/>
<id>urn:sha1:0e3f72931fc47bb81686020cc643cde5d9cd0bb8</id>
<content type='text'>
When copying a large file over sftp over vsock, data size is usually 32kB,
and kmalloc seems to fail to try to allocate 32 32kB regions.

 vhost-5837: page allocation failure: order:4, mode:0x24040c0
 Call Trace:
  [&lt;ffffffffb6a0df64&gt;] dump_stack+0x97/0xdb
  [&lt;ffffffffb68d6aed&gt;] warn_alloc_failed+0x10f/0x138
  [&lt;ffffffffb68d868a&gt;] ? __alloc_pages_direct_compact+0x38/0xc8
  [&lt;ffffffffb664619f&gt;] __alloc_pages_nodemask+0x84c/0x90d
  [&lt;ffffffffb6646e56&gt;] alloc_kmem_pages+0x17/0x19
  [&lt;ffffffffb6653a26&gt;] kmalloc_order_trace+0x2b/0xdb
  [&lt;ffffffffb66682f3&gt;] __kmalloc+0x177/0x1f7
  [&lt;ffffffffb66e0d94&gt;] ? copy_from_iter+0x8d/0x31d
  [&lt;ffffffffc0689ab7&gt;] vhost_vsock_handle_tx_kick+0x1fa/0x301 [vhost_vsock]
  [&lt;ffffffffc06828d9&gt;] vhost_worker+0xf7/0x157 [vhost]
  [&lt;ffffffffb683ddce&gt;] kthread+0xfd/0x105
  [&lt;ffffffffc06827e2&gt;] ? vhost_dev_set_owner+0x22e/0x22e [vhost]
  [&lt;ffffffffb683dcd1&gt;] ? flush_kthread_worker+0xf3/0xf3
  [&lt;ffffffffb6eb332e&gt;] ret_from_fork+0x4e/0x80
  [&lt;ffffffffb683dcd1&gt;] ? flush_kthread_worker+0xf3/0xf3

Work around by doing kvmalloc instead.

Fixes: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko")
Signed-off-by: Junichi Uekawa &lt;uekawa@chromium.org&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Link: https://lore.kernel.org/r/20220928064538.667678-1-uekawa@chromium.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>vsock/vmci: fix repeated words in comments</title>
<updated>2022-09-16T08:31:29Z</updated>
<author>
<name>Jilin Yuan</name>
<email>yuanjilin@cdjrlc.com</email>
</author>
<published>2022-09-07T04:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=454e7b138436a31a17753de58f2178c3e955886c'/>
<id>urn:sha1:454e7b138436a31a17753de58f2178c3e955886c</id>
<content type='text'>
Delete the redundant word 'that'.

Signed-off-by: Jilin Yuan &lt;yuanjilin@cdjrlc.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vmci/vsock: check SO_RCVLOWAT before wake up reader</title>
<updated>2022-08-23T08:43:12Z</updated>
<author>
<name>Arseniy Krasnov</name>
<email>AVKrasnov@sberdevices.ru</email>
</author>
<published>2022-08-19T05:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e061aed99855ccef2d64f5bdd66996e19d6cf60b'/>
<id>urn:sha1:e061aed99855ccef2d64f5bdd66996e19d6cf60b</id>
<content type='text'>
This adds extra condition to wake up data reader: do it only when number
of readable bytes &gt;= SO_RCVLOWAT. Otherwise, there is no sense to kick
user, because it will wait until SO_RCVLOWAT bytes will be dequeued. This
check is performed in vsock_data_ready().

Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio/vsock: check SO_RCVLOWAT before wake up reader</title>
<updated>2022-08-23T08:43:11Z</updated>
<author>
<name>Arseniy Krasnov</name>
<email>AVKrasnov@sberdevices.ru</email>
</author>
<published>2022-08-19T05:39:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=39f1ed33a4489e2f7a55d5a96576c73af3529461'/>
<id>urn:sha1:39f1ed33a4489e2f7a55d5a96576c73af3529461</id>
<content type='text'>
This adds extra condition to wake up data reader: do it only when number
of readable bytes &gt;= SO_RCVLOWAT. Otherwise, there is no sense to kick
user,because it will wait until SO_RCVLOWAT bytes will be dequeued. This
check is performed in vsock_data_ready().

Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>vsock: add API call for data ready</title>
<updated>2022-08-23T08:43:11Z</updated>
<author>
<name>Arseniy Krasnov</name>
<email>AVKrasnov@sberdevices.ru</email>
</author>
<published>2022-08-19T05:36:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f2fdcf67aceb1a7d5e0661cb7ca95cda68d3014a'/>
<id>urn:sha1:f2fdcf67aceb1a7d5e0661cb7ca95cda68d3014a</id>
<content type='text'>
This adds 'vsock_data_ready()' which must be called by transport to kick
sleeping data readers. It checks for SO_RCVLOWAT value before waking
user, thus preventing spurious wake ups. Based on 'tcp_data_ready()' logic.

Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>vsock: pass sock_rcvlowat to notify_poll_in as target</title>
<updated>2022-08-23T08:43:11Z</updated>
<author>
<name>Arseniy Krasnov</name>
<email>AVKrasnov@sberdevices.ru</email>
</author>
<published>2022-08-19T05:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ee0b3843a26920dad713c27cd8f3a3cfc5ae9c37'/>
<id>urn:sha1:ee0b3843a26920dad713c27cd8f3a3cfc5ae9c37</id>
<content type='text'>
Passing 1 as the target to notify_poll_in(), we don't honor
what the user has set via SO_RCVLOWAT, going to set POLLIN
and POLLRDNORM, even if we don't have the amount of bytes
expected by the user.

Let's use sock_rcvlowat() to get the right target to pass to
notify_poll_in();

Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>vmci/vsock: use 'target' in notify_poll_in callback</title>
<updated>2022-08-23T08:43:11Z</updated>
<author>
<name>Arseniy Krasnov</name>
<email>AVKrasnov@sberdevices.ru</email>
</author>
<published>2022-08-19T05:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a274f6ff3c5c79c27d254b48cad3b4814c950908'/>
<id>urn:sha1:a274f6ff3c5c79c27d254b48cad3b4814c950908</id>
<content type='text'>
This callback controls setting of POLLIN, POLLRDNORM output bits of poll()
syscall, but in some cases, it is incorrectly to set it, when socket has
at least 1 bytes of available data. Use 'target' which is already exists.

Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
</feed>
