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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220118104318-mutt-send-email-mst@kernel.org>
Date:   Tue, 18 Jan 2022 10:43:38 -0500
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Cornelia Huck <cohuck@...hat.com>
Cc:     Jason Wang <jasowang@...hat.com>, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org, Halil Pasic <pasic@...ux.ibm.com>,
        virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH] virtio: acknowledge all features before access

On Mon, Jan 17, 2022 at 01:38:42PM +0100, Cornelia Huck wrote:
> On Mon, Jan 17 2022, "Michael S. Tsirkin" <mst@...hat.com> wrote:
> 
> > On Mon, Jan 17, 2022 at 02:31:49PM +0800, Jason Wang wrote:
> >> 
> >> 在 2022/1/15 上午4:09, Michael S. Tsirkin 写道:
> >> > @@ -495,6 +494,10 @@ int virtio_device_restore(struct virtio_device *dev)
> >> >   	/* We have a driver! */
> >> >   	virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
> >> > +	ret = dev->config->finalize_features(dev);
> >> > +	if (ret)
> >> > +		goto err;
> >> 
> >> 
> >> Is this part of code related?
> >> 
> >> Thanks
> >> 
> >
> > Yes. virtio_finalize_features no longer calls dev->config->finalize_features.
> >
> > I think the dev->config->finalize_features callback is actually
> > a misnomer now, it just sends the features to device,
> > finalize is FEATURES_OK. Renaming that is a bigger
> > patch though, and I'd like this one to be cherry-pickable
> > to stable.
> 
> Do we want to add a comment before the calls to ->finalize_features()
> (/* write features to device */) and adapt the comment in virtio_ring.h?
> Should still be stable-friendly, and giving the callback a better name
> can be a follow-up patch.

Sorry which comment in virtio_ring.h?
Could not find anything.

> >
> >> > +
> >> >   	ret = virtio_finalize_features(dev);
> >> >   	if (ret)
> >> >   		goto err;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ