lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Dec 2017 18:46:27 +0100
From:   Greg Kurz <groug@...d.org>
To:     linux-kernel@...r.kernel.org
Cc:     v9fs-developer@...ts.sourceforge.net,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Al Viro <viro@...IV.linux.org.uk>
Subject: [PATCH 0/2] 9p/trans_virtio: handle request cancellation

The 9p protocol mostly relies on a request/reply dialog between the
client and the server. A notable exception to this rule is request
cancellation (ie, flush in 9p wording): when the client requests an
in-flight request to be flushed, the server should only reply to the
flush request and not to the flushed in-flight request (otherwise it
considers the in-flight request to have completed just like it has
never been flushed).

It is up to the client to inform the transport that the in-flight request
has been flushed and won't receive a reply. This is achieved with the
'cancelled' operation of the struct p9_trans_module.

This operation isn't currently implemented with the virtio transport.
As a consequence, flushed requests leave buffers in the used list
forever and the virtqueue ends up in being able to process only one
request at a time.

This issue never popped up because the 9p server in QEMU had a bug
and would always reply to flushed requests. But this will be fixed
soon, so it is time to implement the 'cancelled' operation in the
9p virtio transport.

--
Greg

---

Greg Kurz (2):
      virtio: allow to detach a buffer from the virtqueue
      9p/trans_virtio: implement cancelled callback


 drivers/virtio/virtio_ring.c |   28 ++++++++++++++++++++++++++++
 include/linux/virtio.h       |    1 +
 net/9p/trans_virtio.c        |   18 ++++++++++++++++++
 3 files changed, 47 insertions(+)

Powered by blists - more mailing lists