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: <20210701103406.GE17807@e120937-lin>
Date:   Thu, 1 Jul 2021 11:34:06 +0100
From:   Cristian Marussi <cristian.marussi@....com>
To:     Peter Hilber <peter.hilber@...nsynergy.com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        virtualization@...ts.linux-foundation.org,
        virtio-dev@...ts.oasis-open.org, sudeep.holla@....com,
        james.quinlan@...adcom.com, Jonathan.Cameron@...wei.com,
        f.fainelli@...il.com, etienne.carriere@...aro.org,
        vincent.guittot@...aro.org, souvik.chakravarty@....com,
        igor.skalkin@...nsynergy.com, alex.bennee@...aro.org,
        jean-philippe@...aro.org, mikhail.golubev@...nsynergy.com,
        anton.yakovlev@...nsynergy.com, Vasyl.Vavrychuk@...nsynergy.com,
        Andriy.Tryshnivskyy@...nsynergy.com
Subject: Re: [PATCH v4 14/16] firmware: arm_scmi: Add virtio transport

Hi,

On Thu, Jul 01, 2021 at 10:43:07AM +0200, Peter Hilber wrote:
> On 11.06.21 18:59, Cristian Marussi wrote:
> 
> <snip>
> 
> > +static struct virtio_driver virtio_scmi_driver = {
> > +	.driver.name = "scmi-virtio",
> > +	.driver.owner = THIS_MODULE,
> > +	.feature_table = features,
> > +	.feature_table_size = ARRAY_SIZE(features),
> > +	.id_table = id_table,
> > +	.probe = scmi_vio_probe,
> > +	.remove = scmi_vio_remove,
> > +};
> > +
> 
> It might be good to also check for the VIRTIO_F_VERSION_1 feature bit in the
> optional .validate op (not yet implemented above), as some other devices do
> (quoting virtio-snd in the following):
> 

Ah, thanks for pointing that out, I'll do because indeed in my hackish
emulation test-setup I forgot to emulate that bit and everything fall
flat.

> > /**
> >  * virtsnd_validate() - Validate if the device can be started.
> >  * @vdev: VirtIO parent device.
> >  *
> >  * Context: Any context.
> >  * Return: 0 on success, -EINVAL on failure.
> >  */
> > static int virtsnd_validate(struct virtio_device *vdev)
> > {
> 
> <snip>
> 
> > 
> > 	if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > 		dev_err(&vdev->dev,
> > 			"device does not comply with spec version 1.x\n");
> > 		return -EINVAL;
> > 	}
> > 
> 
> <snip>
> 
> > 
> > static struct virtio_driver virtsnd_driver = {
> > 	.driver.name = KBUILD_MODNAME,
> > 	.driver.owner = THIS_MODULE,
> > 	.id_table = id_table,
> > 	.validate = virtsnd_validate,
> 
> (end of virtio-snd quote)

Thanks,
Cristian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ