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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 13 Feb 2019 10:04:44 -0500
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Cornelia Huck <cohuck@...hat.com>
Cc:     Jason Wang <jasowang@...hat.com>,
        Halil Pasic <pasic@...ux.ibm.com>, linux-s390@...r.kernel.org,
        virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] virtio: hint if callbacks surprisingly might sleep

On Wed, Feb 13, 2019 at 02:44:14PM +0100, Cornelia Huck wrote:
> On Thu, 31 Jan 2019 10:27:53 -0500
> "Michael S. Tsirkin" <mst@...hat.com> wrote:
> 
> > On Thu, Jan 31, 2019 at 01:53:14PM +0100, Cornelia Huck wrote:
> > > A virtio transport is free to implement some of the callbacks in
> > > virtio_config_ops in a matter that they cannot be called from
> > > atomic context (e.g. virtio-ccw, which maps a lot of the callbacks
> > > to channel I/O, which is an inherently asynchronous mechanism).
> > > This can be very surprising for developers using the much more
> > > common virtio-pci transport, just to find out that things break
> > > when used on s390.
> > > 
> > > The documentation for virtio_config_ops now contains a comment
> > > explaining this, but it makes sense to add a might_sleep() annotation
> > > to various wrapper functions in the virtio core to avoid surprises
> > > later.
> > > 
> > > Note that annotations are NOT added to two classes of calls:
> > > - direct calls from device drivers (all current callers should be
> > >   fine, however)
> > > - calls which clearly won't be made from atomic context (such as
> > >   those ultimately coming in via the driver core)
> > > 
> > > Signed-off-by: Cornelia Huck <cohuck@...hat.com>  
> > 
> > 
> > Makes sense to me. I don't think we should push our luck in
> > this release though, better defer until the merge window.
> 
> Friendly ping, as we're quite close to the release of 5.0 now.

Queued now, thanks!

Powered by blists - more mailing lists