* [PATCH 6/6] vfio: do not set FMODE_LSEEK flag [not found] <20220624165631.2124632-1-Jason@zx2c4.com> @ 2022-06-24 16:56 ` Jason A. Donenfeld 2022-06-24 21:53 ` Al Viro 0 siblings, 1 reply; 3+ messages in thread From: Jason A. Donenfeld @ 2022-06-24 16:56 UTC (permalink / raw) To: linux-kernel, viro, Jens Axboe, linux-fsdevel Cc: Jason A. Donenfeld, Alex Williamson, Cornelia Huck, kvm This file does not support llseek, so don't set the flag advertising it. Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Cornelia Huck <cohuck@redhat.com> Cc: kvm@vger.kernel.org Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- drivers/vfio/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index 61e71c1154be..d194dda89542 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -1129,7 +1129,7 @@ static struct file *vfio_device_open(struct vfio_device *device) * Appears to be missing by lack of need rather than * explicitly prevented. Now there's need. */ - filep->f_mode |= (FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE); + filep->f_mode |= (FMODE_PREAD | FMODE_PWRITE); if (device->group->type == VFIO_NO_IOMMU) dev_warn(device->dev, "vfio-noiommu device opened by user " -- 2.35.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6/6] vfio: do not set FMODE_LSEEK flag 2022-06-24 16:56 ` [PATCH 6/6] vfio: do not set FMODE_LSEEK flag Jason A. Donenfeld @ 2022-06-24 21:53 ` Al Viro 2022-06-25 10:52 ` Jason A. Donenfeld 0 siblings, 1 reply; 3+ messages in thread From: Al Viro @ 2022-06-24 21:53 UTC (permalink / raw) To: Jason A. Donenfeld Cc: linux-kernel, Jens Axboe, linux-fsdevel, Alex Williamson, Cornelia Huck, kvm On Fri, Jun 24, 2022 at 06:56:31PM +0200, Jason A. Donenfeld wrote: > This file does not support llseek, so don't set the flag advertising it. ... or it could grow a working llseek - doesn't look like it would be hard to do... ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 6/6] vfio: do not set FMODE_LSEEK flag 2022-06-24 21:53 ` Al Viro @ 2022-06-25 10:52 ` Jason A. Donenfeld 0 siblings, 0 replies; 3+ messages in thread From: Jason A. Donenfeld @ 2022-06-25 10:52 UTC (permalink / raw) To: Al Viro Cc: linux-kernel, Jens Axboe, linux-fsdevel, Alex Williamson, Cornelia Huck, kvm On Fri, Jun 24, 2022 at 10:53:19PM +0100, Al Viro wrote: > On Fri, Jun 24, 2022 at 06:56:31PM +0200, Jason A. Donenfeld wrote: > > This file does not support llseek, so don't set the flag advertising it. > > ... or it could grow a working llseek - doesn't look like it would be > hard to do... I started doing this, but it looks somewhat involved and a bit out of scope here. vfio_device_ops would need to grow a new member, and then the various types of vfio devices would need to start using it and so forth. I'll save that for another series. Jason ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-25 10:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220624165631.2124632-1-Jason@zx2c4.com>
2022-06-24 16:56 ` [PATCH 6/6] vfio: do not set FMODE_LSEEK flag Jason A. Donenfeld
2022-06-24 21:53 ` Al Viro
2022-06-25 10:52 ` Jason A. Donenfeld
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox