linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/15] Handle virtio_device_ready() failure
@ 2021-05-17  9:34 Xie Yongji
  2021-05-17  9:34 ` [RFC PATCH 01/15] virtio_config: Add return value to virtio_device_ready() Xie Yongji
                   ` (14 more replies)
  0 siblings, 15 replies; 19+ messages in thread
From: Xie Yongji @ 2021-05-17  9:34 UTC (permalink / raw)
  To: mst, jasowang, stefanha
  Cc: amit, arei.gonglei, airlied, kraxel, jean-philippe, ohad,
	bjorn.andersson, david, vgoyal, miklos, lucho, asmadeus,
	virtualization, linux-kernel

Now we would trigger a BUG_ON() when we get an invalid status in
virtio_device_ready() during probe and suspend/resume. But
returning invalid status might happen in VDUSE[1] case where
the device becomes untrusted. So this series tries to remove the 
BUG_ON() and return error to the caller so that the device driver
can handle the error correctly.

Now this series is based on my another fix[2].

[1] https://lore.kernel.org/kvm/20210331080519.172-1-xieyongji@bytedance.com/
[2] https://lore.kernel.org/lkml/20210517083557.172-1-xieyongji@bytedance.com/

Xie Yongji (15):
  virtio_config: Add return value to virtio_device_ready()
  virtio-blk: Handle virtio_device_ready() failure
  virtio_console: Handle virtio_device_ready() failure
  virtio_crypto: Handle virtio_device_ready() failure
  drm/virtio: Handle virtio_device_ready() failure
  virtio-iommu: Handle virtio_device_ready() failure
  virtio-net: Handle virtio_device_ready() failure
  rpmsg: virtio: Handle virtio_device_ready() failure
  virtio_scsi: Handle virtio_device_ready() failure
  virtio: Handle virtio_device_ready() failure
  virtio-balloon: Handle virtio_device_ready() failure
  virtio-input: Handle virtio_device_ready() failure
  virtio-mem: Handle virtio_device_ready() failure
  virtiofs: Handle virtio_device_ready() failure
  9p/trans_virtio: Handle virtio_device_ready() failure

 drivers/block/virtio_blk.c                 | 13 +++++++++++--
 drivers/char/virtio_console.c              | 14 ++++++++++++--
 drivers/crypto/virtio/virtio_crypto_core.c |  8 ++++++--
 drivers/gpu/drm/virtio/virtgpu_kms.c       |  8 +++++++-
 drivers/iommu/virtio-iommu.c               |  4 +++-
 drivers/net/virtio_net.c                   | 19 +++++++++++++-----
 drivers/rpmsg/virtio_rpmsg_bus.c           | 31 ++++++++++++++++++------------
 drivers/scsi/virtio_scsi.c                 | 13 ++++++++++---
 drivers/virtio/virtio.c                    |  9 +++++++--
 drivers/virtio/virtio_balloon.c            | 13 +++++++++++--
 drivers/virtio/virtio_input.c              | 11 +++++++++--
 drivers/virtio/virtio_mem.c                |  6 +++++-
 fs/fuse/virtio_fs.c                        |  4 +++-
 include/linux/virtio_config.h              |  8 ++++++--
 net/9p/trans_virtio.c                      |  6 +++++-
 15 files changed, 128 insertions(+), 39 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-05-17 10:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17  9:34 [RFC PATCH 00/15] Handle virtio_device_ready() failure Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 01/15] virtio_config: Add return value to virtio_device_ready() Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 02/15] virtio-blk: Handle virtio_device_ready() failure Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 03/15] virtio_console: " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 04/15] virtio_crypto: " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 05/15] drm/virtio: " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 06/15] virtio-iommu: " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 07/15] virtio-net: " Xie Yongji
2021-05-17  9:34 ` Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 08/15] rpmsg: virtio: " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 10/15] " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 11/15] virtio-balloon: " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 12/15] virtio-input: " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 13/15] virtio-mem: " Xie Yongji
2021-05-17  9:48   ` David Hildenbrand
2021-05-17 10:08     ` Yongji Xie
2021-05-17  9:34 ` [RFC PATCH 14/15] virtiofs: " Xie Yongji
2021-05-17  9:34 ` [RFC PATCH 15/15] 9p/trans_virtio: " Xie Yongji
2021-05-17  9:53   ` asmadeus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).