RE: [PATCH v2 4/5] vfio/iommu_type1: Clean up update_dirty_scope in detach_group()

2022-06-15 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Thursday, June 16, 2022 8:03 AM > > All devices in emulated_iommu_groups have pinned_page_dirty_scope > set, so the update_dirty_scope in the first list_for_each_entry > is always false. Clean it up, and move the "if update_dirty_scope" > part from the detach_group_don

Re: [PATCH v2] virtio_ring : keep used_wrap_counter in vq->last_used_idx

2022-06-15 Thread Michael S. Tsirkin
On Thu, Jun 16, 2022 at 02:07:19AM -0400, Michael S. Tsirkin wrote: > On Thu, Jun 16, 2022 at 01:12:21PM +0800, Albert Huang wrote: > > From: "huangjie.albert" > > > > the used_wrap_counter and the vq->last_used_idx may get > > out of sync if they are separate assignment,and interrupt > > might u

Re: [PATCH v2] virtio_ring : keep used_wrap_counter in vq->last_used_idx

2022-06-15 Thread Michael S. Tsirkin
On Thu, Jun 16, 2022 at 01:12:21PM +0800, Albert Huang wrote: > From: "huangjie.albert" > > the used_wrap_counter and the vq->last_used_idx may get > out of sync if they are separate assignment,and interrupt > might use an incorrect value to check for the used index. > > for example:OOB access >

RE: [PATCH v2 3/5] vfio/iommu_type1: Remove the domain->ops comparison

2022-06-15 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Thursday, June 16, 2022 8:03 AM > > The domain->ops validation was added, as a precaution, for mixed-driver > systems. However, at this moment only one iommu driver is possible. So > remove it. It's true on a physical platform. But I'm not sure whether a virtual plat

RE: [PATCH v2 2/5] vfio/iommu_type1: Prefer to reuse domains vs match enforced cache coherency

2022-06-15 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Thursday, June 16, 2022 8:03 AM > > From: Jason Gunthorpe > > The KVM mechanism for controlling wbinvd is based on OR of the coherency > property of all devices attached to a guest, no matter those devices are > attached to a single domain or multiple domains. > >

RE: [PATCH v2 1/5] iommu: Return -EMEDIUMTYPE for incompatible domain and device/group

2022-06-15 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Thursday, June 16, 2022 8:03 AM > > Cases like VFIO wish to attach a device to an existing domain that was > not allocated specifically from the device. This raises a condition > where the IOMMU driver can fail the domain attach because the domain and > device are inc

Re: [PATCH v2] virtio_ring : keep used_wrap_counter in vq->last_used_idx

2022-06-15 Thread Michael S. Tsirkin
On Thu, Jun 16, 2022 at 01:12:21PM +0800, Albert Huang wrote: > From: "huangjie.albert" > > the used_wrap_counter and the vq->last_used_idx may get > out of sync if they are separate assignment,and interrupt > might use an incorrect value to check for the used index. > > for example:OOB access >

Re: [PATCH v2 2/2] virtiofs: allow skipping abort interface

2022-06-15 Thread Vivek Goyal
On Wed, Jun 15, 2022 at 01:57:55PM +0800, Xie Yongji wrote: > Virtio-fs does not support aborting requests which are being > processed. Otherwise, it might trigger UAF since > virtio_fs_request_complete() doesn't know the requests are > aborted. So let's remove the abort interface. > > Fixes: 15c8

Re: [PATCH v2 1/2] fuse: Remove unused "no_control" related code

2022-06-15 Thread Vivek Goyal
On Wed, Jun 15, 2022 at 01:57:54PM +0800, Xie Yongji wrote: > This gets rid of "no_control" related code since > nobody uses it. > > Signed-off-by: Xie Yongji Good to get rid of this knob. Nobody is using it. Reviewed-by: Vivek Goyal Vivek > --- > fs/fuse/fuse_i.h| 4 > fs/fuse/ino

Re: [PATCH v2 2/2] virtiofs: allow skipping abort interface

2022-06-15 Thread Vivek Goyal
On Wed, Jun 15, 2022 at 01:57:55PM +0800, Xie Yongji wrote: > Virtio-fs does not support aborting requests which are being > processed. Otherwise, it might trigger UAF since What is full form of UAF? Use after free? Thanks Vivek > virtio_fs_request_complete() doesn't know the requests are > abor

Re: [PATCH] virtiofs: delete unused parameter for virtio_fs_cleanup_vqs

2022-06-15 Thread Vivek Goyal
On Thu, Jun 09, 2022 at 10:08:38PM -0400, Deming Wang wrote: > fs parameter not used. So, it needs to be deleted. > > Signed-off-by: Deming Wang Thanks Deming Wang for the patch. Good cleanup. Reviewed-by: Vivek Goyal Thanks Vivek > --- > fs/fuse/virtio_fs.c | 7 +++ > 1 file changed, 3

Re: [PATCH] virtiofs: delete unused parameter for virtio_fs_cleanup_vqs

2022-06-15 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:08:38PM -0400, Deming Wang wrote: > fs parameter not used. So, it needs to be deleted. > > Signed-off-by: Deming Wang > --- > fs/fuse/virtio_fs.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description:

Re: [PATCH v1] vduse: Tie vduse mgmtdev and its device

2022-06-15 Thread Jason Wang
On Tue, Jun 14, 2022 at 3:52 AM Parav Pandit wrote: > > vduse devices are not backed by any real devices such as PCI. Hence it > doesn't have any parent device linked to it. > > Kernel driver model in [1] suggests to avoid an empty device > release callback. > > Hence tie the mgmtdevice object's l

RE: [PATCH 3/5] vfio/iommu_type1: Prefer to reuse domains vs match enforced cache coherency

2022-06-15 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Wednesday, June 15, 2022 4:45 AM > > Hi Kevin, > > On Wed, Jun 08, 2022 at 11:48:27PM +, Tian, Kevin wrote: > > > > > The KVM mechanism for controlling wbinvd is only triggered during > > > > > kvm_vfio_group_add(), meaning it is a one-shot test done once the > >