New issue
Advanced search Search tips

Issue 763970 link

Starred by 46 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment

backport vsock support to kernels v3.14 and v3.18

Project Member Reported by za...@chromium.org, Sep 11 2017

Issue description

samus board is a target for the containers project and it runs on kernel v3.14. Because matred requires vsock on the host's kernel to operate, vsock support must be backported.
 

Comment 1 by za...@chromium.org, Sep 26 2017

Owner: smbar...@chromium.org
Assigning to smbarber@ because that was the last person to touch the code related to this.
Status: Available (was: Started)
Deferred until a decision is made on uprevving kernels.
Cc: sonnyrao@chromium.org
not sure we should wait for uprevs to happen -- that will probably take significantly longer than backporting something.  I'll volunteer to look at this after I'm done with the current task
Components: OS>Systems>Containers
Labels: Hotlist-Crostini-Platform
Owner: sonnyrao@chromium.org
Status: Started (was: Available)
I'm looking at 3.18 now
Summary: backport vsock support to kernels v3.14 and v3.18 (was: backport vsock support to kernel v3.14)
Project Member

Comment 9 by bugdroid1@chromium.org, May 17

Labels: merge-merged-chromeos-3.18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e22750350c49a26a7385393f17d66d199217fe3d

commit e22750350c49a26a7385393f17d66d199217fe3d
Author: Michael S. Tsirkin <mst@redhat.com>
Date: Thu May 17 14:22:10 2018

UPSTREAM: vhost: drop vringh dependency

vringh isn't used by vhost net or scsi - it's used
by CAIF only at the moment. Drop the dependency.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 6190efb08c16dcd68c64b096a28f47ab33f017d7)

BUG= chromium:763970 
TEST=build with USE=kvm_host on caroline

Change-Id: I6c7670abee6f893f82e86d0f4c96d4f3aeff22ab
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/498089
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058932

[modify] https://crrev.com/e22750350c49a26a7385393f17d66d199217fe3d/drivers/vhost/Kconfig

Project Member

Comment 10 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/946d0ff8555d26d9bea65ae78f4848bb1e3c146b

commit 946d0ff8555d26d9bea65ae78f4848bb1e3c146b
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu May 17 14:22:11 2018

UPSTREAM: VSOCK: transport-specific vsock_transport functions

struct vsock_transport contains function pointers called by AF_VSOCK
core code.  The transport may want its own transport-specific function
pointers and they can be added after struct vsock_transport.

Allow the transport to fetch vsock_transport.  It can downcast it to
access transport-specific function pointers.

The virtio transport will use this.

BUG= chromium:763970 
TEST=build with USE=kvm_host on caroline

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 0b01aeb3d2fbf16787f0c9629f4ca52ae792f732)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

Change-Id: I2c11b52a466140b3c64e2a1ea9025a1b63dcf5d0
Reviewed-on: https://chromium-review.googlesource.com/1058933
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/946d0ff8555d26d9bea65ae78f4848bb1e3c146b/include/net/af_vsock.h
[modify] https://crrev.com/946d0ff8555d26d9bea65ae78f4848bb1e3c146b/net/vmw_vsock/af_vsock.c

Project Member

Comment 11 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d573525626192ae73e2d59deffc6488e40f5eb95

commit d573525626192ae73e2d59deffc6488e40f5eb95
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu May 17 14:22:13 2018

UPSTREAM: VSOCK: defer sock removal to transports

The virtio transport will implement graceful shutdown and the related
SO_LINGER socket option.  This requires orphaning the sock but keeping
it in the table of connections after .release().

This patch adds the vsock_remove_sock() function and leaves it up to the
transport when to remove the sock.

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 6773b7dc39f165bd9d824b50ac52cbb3f87d53c8)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

Change-Id: I92c70ceecb8ba2d67bc2f3ec32fc296fefee6579
Reviewed-on: https://chromium-review.googlesource.com/1058934
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/d573525626192ae73e2d59deffc6488e40f5eb95/include/net/af_vsock.h
[modify] https://crrev.com/d573525626192ae73e2d59deffc6488e40f5eb95/net/vmw_vsock/vmci_transport.c
[modify] https://crrev.com/d573525626192ae73e2d59deffc6488e40f5eb95/net/vmw_vsock/af_vsock.c

Project Member

Comment 12 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5c0188181c3e1b5caf173345ef2aab63d19921e1

commit 5c0188181c3e1b5caf173345ef2aab63d19921e1
Author: Jorgen Hansen <jhansen@vmware.com>
Date: Thu May 17 14:22:14 2018

UPSTREAM: VSOCK: Don't dec ack backlog twice for rejected connections

If a pending socket is marked as rejected, we will decrease the
sk_ack_backlog twice. So don't decrement it for rejected sockets
in vsock_pending_work().

Testing of the rejected socket path was done through code
modifications.

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Reviewed-by: Adit Ranadive <aditr@vmware.com>
Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 1190cfdb1a19d89561ae51cff7d9c2ead24b3ebe)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

Change-Id: Ife543376c1f334cc446ff80735642dd86bcad999
Reviewed-on: https://chromium-review.googlesource.com/1058935
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/5c0188181c3e1b5caf173345ef2aab63d19921e1/net/vmw_vsock/af_vsock.c

Project Member

Comment 13 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e4d908225cba73f8c376849e52210ce80e986a17

commit e4d908225cba73f8c376849e52210ce80e986a17
Author: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Date: Thu May 17 14:22:16 2018

UPSTREAM: AF_VSOCK: Shrink the area influenced by prepare_to_wait

When a thread is prepared for waiting by calling prepare_to_wait, sleeping
is not allowed until either the wait has taken place or finish_wait has
been called.  The existing code in af_vsock imposed unnecessary no-sleep
assumptions to a broad list of backend functions.
This patch shrinks the influence of prepare_to_wait to the area where it
is strictly needed, therefore relaxing the no-sleep restriction there.

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f7f9b5e7f8eccfd68ffa7b8d74b07c478bb9e7f0)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

Change-Id: I01a0fdf5272a88e534b80d978f215cbe6772cb03
Reviewed-on: https://chromium-review.googlesource.com/1058936
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/e4d908225cba73f8c376849e52210ce80e986a17/net/vmw_vsock/af_vsock.c

Project Member

Comment 14 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5bcf6d28821978c573a3fd2761d66b0dec890d06

commit 5bcf6d28821978c573a3fd2761d66b0dec890d06
Author: WANG Cong <xiyou.wangcong@gmail.com>
Date: Thu May 17 14:22:17 2018

UPSTREAM: vsock: use new wait API for vsock_stream_sendmsg()

As reported by Michal, vsock_stream_sendmsg() could still
sleep at vsock_stream_has_space() after prepare_to_wait():

  vsock_stream_has_space
    vmci_transport_stream_has_space
      vmci_qpair_produce_free_space
        qp_lock
          qp_acquire_queue_mutex
            mutex_lock

Just switch to the new wait API like we did for commit
d9dc8b0f8b4e ("net: fix sleeping for sk_wait_event()").

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Reported-by: Michal Kubecek <mkubecek@suse.cz>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Jorgen Hansen <jhansen@vmware.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 499fde662f1957e3cb8d192a94a099ebe19c714b)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

Change-Id: I6a363d392bb95da6ac7d017f90be02d8c8a708a6
Reviewed-on: https://chromium-review.googlesource.com/1058937
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/5bcf6d28821978c573a3fd2761d66b0dec890d06/net/vmw_vsock/af_vsock.c

Project Member

Comment 15 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/227e3da6dec833644fc81767021c2c7d8ccaff7d

commit 227e3da6dec833644fc81767021c2c7d8ccaff7d
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu May 17 14:22:19 2018

UPSTREAM: VSOCK: define VSOCK_SS_LISTEN once only

The SS_LISTEN socket state is defined by both af_vsock.c and
vmci_transport.c.  This is risky since the value could be changed in one
file and the other would be out of sync.

Rename from SS_LISTEN to VSOCK_SS_LISTEN since the constant is not part
of enum socket_state (SS_CONNECTED, ...).  This way it is clear that the
constant is vsock-specific.

The big text reflow in af_vsock.c was necessary to keep to the maximum
line length.  Text is unchanged except for s/SS_LISTEN/VSOCK_SS_LISTEN/.

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ea3803c193df18d8353d6c8d77034066a08c19f5)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

Change-Id: I3dd283ccc65b851441b1ec96d2b09e9b779b2d82
Reviewed-on: https://chromium-review.googlesource.com/1058938
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/227e3da6dec833644fc81767021c2c7d8ccaff7d/include/net/af_vsock.h
[modify] https://crrev.com/227e3da6dec833644fc81767021c2c7d8ccaff7d/net/vmw_vsock/vmci_transport.c
[modify] https://crrev.com/227e3da6dec833644fc81767021c2c7d8ccaff7d/net/vmw_vsock/af_vsock.c

Project Member

Comment 16 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/0997c41fde381a6315e997e37961d81805651c5a

commit 0997c41fde381a6315e997e37961d81805651c5a
Author: Sonny Rao <sonnyrao@chromium.org>
Date: Thu May 17 14:22:20 2018

CHROMIUM: vsock: remove kiocb arg from dgram_dequeue in vsock_transport

This is a very targeted backport of upstream 1b784140474
"net: Remove iocb argument from sendmsg and recvmsg" only for the
vsock code.  The argument is not used and later vsock transport code
doesn't provide it.

I chose to do it this way because it touches much less
networking code and we're missing some of the preceding
infrastructure changes in 3.18 to do a clean cherry-pick.

This will break building with VMWARE_VMCI_VSOCKETS but we don't use
this and probably never will.

BUG= chromium:763970 
TEST=build with USE=kvm_host on caroline

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

Change-Id: Ibb908e18a34e85e963987be6cd556fe69dda5c89
Reviewed-on: https://chromium-review.googlesource.com/1058939
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/0997c41fde381a6315e997e37961d81805651c5a/include/net/af_vsock.h
[modify] https://crrev.com/0997c41fde381a6315e997e37961d81805651c5a/net/vmw_vsock/af_vsock.c

Project Member

Comment 17 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/bb870f56512d09f4d00e3d7a8b99abb3c11df395

commit bb870f56512d09f4d00e3d7a8b99abb3c11df395
Author: Asias He <asias@redhat.com>
Date: Thu May 17 14:22:22 2018

BACKPORT: VSOCK: Introduce virtio_vsock_common.ko

This module contains the common code and header files for the following
virtio_transporto and vhost_vsock kernel modules.

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 06a8fc78367d070720af960dcecec917d3ae5f3b)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
[SR: 3.18 backport notes:
  - remove trace enum usage from ftrace header as 3.18 doesn't have support
  - use memcpy_{to,from}iovec instead of using memcpy_{to,from}_msg
     because 3.18 doesn't have the memcpy_to_msg function
  - and change usage of msghdr to iovec in transport callbacks and struct
     virtio_vsock_pkt_info
  - remove "kern" argument to __vsock_create as this was added later and
     was set to 0
  - some trivial context conflicts]
 Conflicts:
	MAINTAINERS
	include/uapi/linux/Kbuild
	include/uapi/linux/virtio_ids.h

Change-Id: Iff501b7eac6dc5d360772407f1103e14564372a7
Reviewed-on: https://chromium-review.googlesource.com/1058940
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/bb870f56512d09f4d00e3d7a8b99abb3c11df395/include/uapi/linux/Kbuild
[add] https://crrev.com/bb870f56512d09f4d00e3d7a8b99abb3c11df395/include/trace/events/vsock_virtio_transport_common.h
[modify] https://crrev.com/bb870f56512d09f4d00e3d7a8b99abb3c11df395/include/net/af_vsock.h
[modify] https://crrev.com/bb870f56512d09f4d00e3d7a8b99abb3c11df395/MAINTAINERS
[add] https://crrev.com/bb870f56512d09f4d00e3d7a8b99abb3c11df395/net/vmw_vsock/virtio_transport_common.c
[modify] https://crrev.com/bb870f56512d09f4d00e3d7a8b99abb3c11df395/include/uapi/linux/virtio_ids.h
[add] https://crrev.com/bb870f56512d09f4d00e3d7a8b99abb3c11df395/include/linux/virtio_vsock.h
[add] https://crrev.com/bb870f56512d09f4d00e3d7a8b99abb3c11df395/include/uapi/linux/virtio_vsock.h

Project Member

Comment 18 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/6d6df7d55ce356241899131c1581d8cda241e4ce

commit 6d6df7d55ce356241899131c1581d8cda241e4ce
Author: Asias He <asias@redhat.com>
Date: Thu May 17 14:22:23 2018

UPSTREAM: VSOCK: Introduce virtio_transport.ko

VM sockets virtio transport implementation.  This driver runs in the
guest.

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 0ea9e1d3a9e3ef7d2a1462d3de6b95131dc7d872)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I36c60eb869e6ea8fbb2a589991aff0bb75740758
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/483925
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058941
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/6d6df7d55ce356241899131c1581d8cda241e4ce/MAINTAINERS
[add] https://crrev.com/6d6df7d55ce356241899131c1581d8cda241e4ce/net/vmw_vsock/virtio_transport.c

Project Member

Comment 19 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/cc760a485cc3bbe0678717d74ff47848e7f8a12b

commit cc760a485cc3bbe0678717d74ff47848e7f8a12b
Author: Greg Kurz <gkurz@linux.vnet.ibm.com>
Date: Thu May 17 14:22:25 2018

UPSTREAM: vhost: rename vhost_init_used()

Looking at how callers use this, maybe we should just rename init_used
to vhost_vq_init_access. The _used suffix was a hint that we
access the vq used ring. But maybe what callers care about is
that it must be called after access_ok.

Also, this function manipulates the vq->is_le field which isn't related
to the vq used ring.

This patch simply renames vhost_init_used() to vhost_vq_init_access() as
suggested by Michael.

No behaviour change.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 80f7d0301e7913f704d3505722f806717c61dff5)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I78412b65345d6c2c2ebf05d2c9973e960bdc38f1
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486201
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058942

[modify] https://crrev.com/cc760a485cc3bbe0678717d74ff47848e7f8a12b/drivers/vhost/vhost.h
[modify] https://crrev.com/cc760a485cc3bbe0678717d74ff47848e7f8a12b/drivers/vhost/test.c
[modify] https://crrev.com/cc760a485cc3bbe0678717d74ff47848e7f8a12b/drivers/vhost/scsi.c
[modify] https://crrev.com/cc760a485cc3bbe0678717d74ff47848e7f8a12b/drivers/vhost/vhost.c
[modify] https://crrev.com/cc760a485cc3bbe0678717d74ff47848e7f8a12b/drivers/vhost/net.c

Project Member

Comment 20 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/96ae615c0139207408e340a86a58527f87b04a92

commit 96ae615c0139207408e340a86a58527f87b04a92
Author: Asias He <asias@redhat.com>
Date: Thu May 17 14:22:26 2018

UPSTREAM: VSOCK: Introduce vhost_vsock.ko

VM sockets vhost transport implementation.  This driver runs on the
host.

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 433fc58e6bf2c8bd97e57153ed28e64fd78207b8)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I74b24b264d3d0034ed3a9f82f9af30c05ff7dd77
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/483926
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058943
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/96ae615c0139207408e340a86a58527f87b04a92/MAINTAINERS
[modify] https://crrev.com/96ae615c0139207408e340a86a58527f87b04a92/include/uapi/linux/vhost.h
[add] https://crrev.com/96ae615c0139207408e340a86a58527f87b04a92/drivers/vhost/vsock.c

Project Member

Comment 21 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e66198ace08c43fd431db1c16d7a39d6ab9bb1e2

commit e66198ace08c43fd431db1c16d7a39d6ab9bb1e2
Author: Asias He <asias@redhat.com>
Date: Thu May 17 14:22:28 2018

UPSTREAM: VSOCK: Add Makefile and Kconfig

Enable virtio-vsock and vhost-vsock.

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 304ba62fd4e670c1a5784585da0fac9f7309ef6c)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: Ib20fda8f1de1b954c811a99f933902bc65796552
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/483927
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058944
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/e66198ace08c43fd431db1c16d7a39d6ab9bb1e2/net/vmw_vsock/Kconfig
[modify] https://crrev.com/e66198ace08c43fd431db1c16d7a39d6ab9bb1e2/drivers/vhost/Makefile
[modify] https://crrev.com/e66198ace08c43fd431db1c16d7a39d6ab9bb1e2/drivers/vhost/Kconfig
[modify] https://crrev.com/e66198ace08c43fd431db1c16d7a39d6ab9bb1e2/net/vmw_vsock/Makefile

Project Member

Comment 22 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/10463ce9d00bd041177314108ecb766ab3658e98

commit 10463ce9d00bd041177314108ecb766ab3658e98
Author: Michael S. Tsirkin <mst@redhat.com>
Date: Thu May 17 14:22:29 2018

UPSTREAM: vhost: drop vringh dependency

vringh isn't used by vhost net or scsi - it's used
by CAIF only at the moment. Drop the dependency.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit b2fbd8b0737803f527bc7671a14bd6736d78b5d7)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: Iee9da47d36ad9262a14a82e8d503f053bb074da7
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/498088
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058945

[modify] https://crrev.com/10463ce9d00bd041177314108ecb766ab3658e98/drivers/Makefile

Project Member

Comment 23 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c9157e77cafb15f0a123b0bc032e60023d75e2d3

commit c9157e77cafb15f0a123b0bc032e60023d75e2d3
Author: Wei Yongjun <weiyj.lk@gmail.com>
Date: Thu May 17 14:22:31 2018

UPSTREAM: VSOCK: Use kvfree()

Use kvfree() instead of open-coding it.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit b226acab2f6aaa45c2af27279b63f622b23a44bd)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I1f7c29287912741b0c17d576204cd799be4d54c3
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/483928
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058946
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/c9157e77cafb15f0a123b0bc032e60023d75e2d3/drivers/vhost/vsock.c

Project Member

Comment 24 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1901a279dd67129ddf6978aad9bea49e3f033b74

commit 1901a279dd67129ddf6978aad9bea49e3f033b74
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu May 17 14:22:32 2018

UPSTREAM: vhost/vsock: fix vhost virtio_vsock_pkt use-after-free

Stash the packet length in a local variable before handing over
ownership of the packet to virtio_transport_recv_pkt() or
virtio_transport_free_pkt().

This patch solves the use-after-free since pkt is no longer guaranteed
to be alive.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 3fda5d6e580193fa005014355b3a61498f1b3ae0)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: Icac123959c22818ccf4797d343e49ffc9210616c
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669297
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058967
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/1901a279dd67129ddf6978aad9bea49e3f033b74/drivers/vhost/vsock.c

Project Member

Comment 25 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e56a89e33d598ef4e2e93d1bb1d61c84b4ec0a7c

commit e56a89e33d598ef4e2e93d1bb1d61c84b4ec0a7c
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu May 17 14:22:34 2018

UPSTREAM: virtio-vsock: fix include guard typo

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 28ad55578b8a76390d966b09da8c7fa3644f5140)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I5bfd43fec241bf31ce00da900332d82dc9b11703
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669298
Signed-off-by: Sonny Rao <sonntrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058968
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/e56a89e33d598ef4e2e93d1bb1d61c84b4ec0a7c/include/uapi/linux/virtio_vsock.h

Project Member

Comment 26 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d2e77fc155cd08ba4a379c86f194264c8067cb1c

commit d2e77fc155cd08ba4a379c86f194264c8067cb1c
Author: Gerard Garcia <ggarcia@deic.uab.cat>
Date: Thu May 17 14:22:35 2018

UPSTREAM: vhost/vsock: drop space available check for TX vq

Remove unnecessary use of enable/disable callback notifications
and the incorrect more space available check.

The virtio_transport_tx_work handles when the TX virtqueue
has more buffers available.

Signed-off-by: Gerard Garcia <ggarcia@deic.uab.cat>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 21bc54fc0cdc31de72b57d2b3c79cf9c2b83cf39)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I1733711b6b87493e3789969ff2cf4b2da00567c0
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669379
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058969
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/d2e77fc155cd08ba4a379c86f194264c8067cb1c/net/vmw_vsock/virtio_transport.c

Project Member

Comment 27 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5344eb8eac6227597d77bc8c6655ce8aed62dd33

commit 5344eb8eac6227597d77bc8c6655ce8aed62dd33
Author: Peng Tao <bergwolf@gmail.com>
Date: Thu May 17 14:22:37 2018

UPSTREAM: vhost-vsock: remove unused vq variable

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

(cherry picked from commit 1440a3a12ba0a00f9fec7e6a62e49b11e079d381)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I91144eb00bc812316d4e7650cc1508aaf255cb97
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669380
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058970
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/5344eb8eac6227597d77bc8c6655ce8aed62dd33/drivers/vhost/vsock.c

Project Member

Comment 28 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/abacedc77ea93a65d57318593963af7cf04022f6

commit abacedc77ea93a65d57318593963af7cf04022f6
Author: Peng Tao <bergwolf@gmail.com>
Date: Thu May 17 14:22:38 2018

UPSTREAM: vhost-vsock: fix orphan connection reset

local_addr.svm_cid is host cid. We should check guest cid instead,
which is remote_addr.svm_cid. Otherwise we end up resetting all
connections to all guests.

Cc: stable@vger.kernel.org [4.8+]
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

(cherry picked from commit c4587631c7bad47c045e081d1553cd73a23be59a)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I575b45b4e5a7342f6222742d6cc5b8f5fc1eff08
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669381
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058971
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/abacedc77ea93a65d57318593963af7cf04022f6/drivers/vhost/vsock.c

Project Member

Comment 29 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/cdbe7a02194f577fa95ad4f5de3691adf1bfb1b2

commit cdbe7a02194f577fa95ad4f5de3691adf1bfb1b2
Author: Michael S. Tsirkin <mst@redhat.com>
Date: Thu May 17 14:22:40 2018

UPSTREAM: vsock/virtio: add a missing __le annotation

guest cid is read from config space, therefore it's in little endian
format and is treated as such, annotate it accordingly.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 6c7efafdd5c1639084dd08ace82567e19a4032be)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: Iea4ad4045898b4ba0991688421b3adc558003ee8
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669382
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058972
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/cdbe7a02194f577fa95ad4f5de3691adf1bfb1b2/net/vmw_vsock/virtio_transport.c

Project Member

Comment 30 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8f0f577210d8c7310c6b46df6082475db8f2d419

commit 8f0f577210d8c7310c6b46df6082475db8f2d419
Author: Michael S. Tsirkin <mst@redhat.com>
Date: Thu May 17 14:22:41 2018

UPSTREAM: vsock/virtio: mark an internal function static

virtio_transport_alloc_pkt is only used locally, make it static.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 819483d806f4324b42a25f8dd760735ae659141c)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: I7e61cd1827a0d00cea21efdf8bdb00dd808f9c31
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669383
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058973
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/8f0f577210d8c7310c6b46df6082475db8f2d419/net/vmw_vsock/virtio_transport_common.c

Project Member

Comment 31 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c39edab7a2220f49dbf1800bffd68ffe9daf5b0f

commit c39edab7a2220f49dbf1800bffd68ffe9daf5b0f
Author: Michael S. Tsirkin <mst@redhat.com>
Date: Thu May 17 14:22:43 2018

UPSTREAM: vsock/virtio: fix src/dst cid format

These fields are 64 bit, using le32_to_cpu and friends
on these will not do the right thing.
Fix this up.

Cc: stable@vger.kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit f83f12d660d11718d3eed9d979ee03e83aa55544)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: Ia8b2fb66b357231ef82d6e6727e8cc1a8fa94267
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669384
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058974
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/c39edab7a2220f49dbf1800bffd68ffe9daf5b0f/net/vmw_vsock/virtio_transport_common.c

Project Member

Comment 32 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f1618d646da909feef5013caf55057d93e1a72af

commit f1618d646da909feef5013caf55057d93e1a72af
Author: Gao feng <omarapazanadi@gmail.com>
Date: Thu May 17 14:22:44 2018

UPSTREAM: vsock: lookup and setup guest_cid inside vhost_vsock_lock

Multi vsocks may setup the same cid at the same time.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

(cherry picked from commit 6c083c2b8a0a110cad936bc0a2c089f0d8115175)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: Ic3347d0555f9141bb739a1734cd6941161f23c50
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669385
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058975
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/f1618d646da909feef5013caf55057d93e1a72af/drivers/vhost/vsock.c

Project Member

Comment 33 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/69fcaffefa965594b4089893b1123ac16357e868

commit 69fcaffefa965594b4089893b1123ac16357e868
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu May 17 14:22:46 2018

UPSTREAM: vhost/vsock: handle vhost_vq_init_access() error

Propagate the error when vhost_vq_init_access() fails and set
vq->private_data to NULL.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 0516ffd88fa0d006ee80389ce14a9ca5ae45e845)

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: Iecee94337b82b41c1b980c08be13df9ffb7f8020
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669386
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1058976
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/69fcaffefa965594b4089893b1123ac16357e868/drivers/vhost/vsock.c

Project Member

Comment 34 by bugdroid1@chromium.org, May 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/b55626ccc22c78558b4341848b02e14febcd23d8

commit b55626ccc22c78558b4341848b02e14febcd23d8
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu May 17 14:22:47 2018

BACKPORT: vhost/vsock: use static minor number

Vhost-vsock is a software device so there is no probe call that causes
the driver to register its misc char device node.  This creates a
chicken and egg problem: userspace applications must open
/dev/vhost-vsock to use the driver but the file doesn't exist until the
kernel module has been loaded.

Use the devname modalias mechanism so that /dev/vhost-vsock is created
at boot.  The vhost_vsock kernel module is automatically loaded when the
first application opens /dev/host-vsock.

Note that the "reserved for local use" range in
Documentation/admin-guide/devices.txt is incorrect.  The userio driver
already occupies part of that range.  I've updated the documentation
accordingly.

Cc: device@lanana.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit f4660cc994e12bae60d6f49895636fba662ce0a1)

Conflicts:
	Documentation/admin-guide/devices.txt

- This file did not exist in our tree so I removed it from the commit.

BUG= chromium:763970 
TEST=build caroline with USE=kvm_host

Change-Id: Id9966bc55e835ae9a65a71ecdf3b412fb88ecad4
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669387
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
[SR: context conflicts in 3.18]
 Conflicts:
    include/linux/miscdevice.h
Reviewed-on: https://chromium-review.googlesource.com/1058977
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/b55626ccc22c78558b4341848b02e14febcd23d8/include/linux/miscdevice.h
[modify] https://crrev.com/b55626ccc22c78558b4341848b02e14febcd23d8/drivers/vhost/vsock.c

Status: Fixed (was: Started)
3.18 has been done for a while, 3.14 is too old at this point.
"3.14 is too old at this point."

Does this mean Linux apps will not be coming to samus?
3.14 is missing a lot of necessary security fixes.  I'm not sure/can't comment about Samus.
Samus uname -a outputs:
Linux localhost 3.14.0 #1 SMP PREEMPT Wed Aug 1 21:14:20 PDT 2018 x86_64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz GenuineIntel GNU/Linux

So, sounds like no love for Samus
Where can we get more information on Samus and/or whether we will be getting Crostini?

These devices (especially the LS) is such a powerful device and more than capable that it would be a shame to not allow Crostini on them.

Since this was an official Google device I'd expect it to get some love from Google?
i really expected google would show more love for their overpriced laptops...
Seems like ill go for c302 instead of pixelbook.
Labels: Restrict-AddIssueComment-EditIssue
you can find documentation here:
  https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md

this bug is not about any device, it's about backporting a specific set of features (vsock) to some kernel versions.  the only devices we've made decisions about are listed in the aforementioned doc.

Sign in to add a comment