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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 30 Oct 2019 15:36:24 +0800
From:   Zhu Lingshan <lingshan.zhu@...ux.intel.com>
To:     Jason Wang <jasowang@...hat.com>, kvm@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
        intel-gvt-dev@...ts.freedesktop.org, kwankhede@...dia.com,
        alex.williamson@...hat.com, mst@...hat.com, tiwei.bie@...el.com
Cc:     virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        cohuck@...hat.com, maxime.coquelin@...hat.com,
        cunming.liang@...el.com, zhihong.wang@...el.com,
        rob.miller@...adcom.com, xiao.w.wang@...el.com,
        haotian.wang@...ive.com, zhenyuw@...ux.intel.com,
        zhi.a.wang@...el.com, jani.nikula@...ux.intel.com,
        joonas.lahtinen@...ux.intel.com, rodrigo.vivi@...el.com,
        airlied@...ux.ie, daniel@...ll.ch, farman@...ux.ibm.com,
        pasic@...ux.ibm.com, sebott@...ux.ibm.com, oberpar@...ux.ibm.com,
        heiko.carstens@...ibm.com, gor@...ux.ibm.com,
        borntraeger@...ibm.com, akrowiak@...ux.ibm.com,
        freude@...ux.ibm.com, lingshan.zhu@...el.com, idos@...lanox.com,
        eperezma@...hat.com, lulu@...hat.com, parav@...lanox.com,
        christophe.de.dinechin@...il.com, kevin.tian@...el.com,
        stefanha@...hat.com
Subject: Re: [PATCH V5 4/6] mdev: introduce virtio device and its device ops

On 10/29/2019 6:42 PM, Jason Wang wrote:
> On 2019/10/29 下午3:42, Zhu Lingshan wrote:
>>> +    void (*set_status)(struct mdev_device *mdev, u8 status);
>> Hi Jason
>>
>> Is it possible to make set_status() return an u8 or bool, because this
>> may fail in real hardware. Without a returned code, I am not sure
>> whether it is a good idea to set the status | NEED_RESET when fail.
>>
>> Thanks,
>> BR
>> Zhu Lingshan
>
> Hi:
>
>
> It's possible but I'm not sure whether any user will care about it. E.g
> see virtio_add_status():
>
> void virtio_add_status(struct virtio_device *dev, unsigned int status)
> {
>      might_sleep();
>      dev->config->set_status(dev, dev->config->get_status(dev) | status);
> }
> EXPORT_SYMBOL_GPL(virtio_add_status);
>
> And I believe how it work should be:
>
> virtio_add_status(xyz);
>
> status = virtio_get_status();
>
> if (!(status & xyz))
>
>      error;
>
> Thanks
>
Thanks Jason, then I believe upper layer can handle this well.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ