Re: [PATCH] vhost_net: Use fdget() and fdput()

2023-05-10 Thread Al Viro
On Fri, May 05, 2023 at 02:24:04PM +0800, ye.xingc...@zte.com.cn wrote: > From: Ye Xingchen > > convert the fget()/fput() uses to fdget()/fdput(). > > Signed-off-by: Ye Xingchen > --- > drivers/vhost/net.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git

Re: [PATCH] vhost_net: fix double fget()

2022-05-17 Thread Al Viro
On Mon, May 16, 2022 at 04:44:19AM -0400, Michael S. Tsirkin wrote: > > Signed-off-by: Al Viro > > Signed-off-by: Jason Wang > > Acked-by: Michael S. Tsirkin > > and this is stable material I guess. It is, except that commit message ought to be cleaned up. S

Re: [PATCH v13 03/13] file: Export receive_fd() to modules

2021-09-05 Thread Al Viro
On Sun, Sep 05, 2021 at 11:57:22AM -0400, Michael S. Tsirkin wrote: > On Tue, Aug 31, 2021 at 06:36:24PM +0800, Xie Yongji wrote: > > Export receive_fd() so that some modules can use > > it to pass file descriptor between processes without > > missing any security stuffs. > > > > Signed-off-by:

Re: [PATCH v4 1/5] fuse: Fix leak in fuse_dentry_automount() error path

2021-05-20 Thread Al Viro
On Thu, May 20, 2021 at 05:46:50PM +0200, Greg Kurz wrote: > Some rollback was forgotten during the addition of crossmounts. Have you actually tested that? Because I strongly suspect that by that point the ownership of fc and fm is with sb and those should be taken care of by

Re: [PATCH v7 11/12] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-05-20 Thread Al Viro
On Mon, May 17, 2021 at 05:55:12PM +0800, Xie Yongji wrote: > + case VDUSE_IOTLB_GET_FD: { > + struct vduse_iotlb_entry entry; > + struct vhost_iotlb_map *map; > + struct vdpa_map_file *map_file; > + struct vduse_iova_domain *domain =

Re: [PATCH v7 02/12] file: Export receive_fd() to modules

2021-05-20 Thread Al Viro
On Mon, May 17, 2021 at 05:55:03PM +0800, Xie Yongji wrote: > Export receive_fd() so that some modules can use > it to pass file descriptor between processes without > missing any security stuffs. Which tree is that against? Because in mainline this won't even build, let alone work. > ---

Re: [PATCH] fuse: Avoid potential use after free

2021-04-21 Thread Al Viro
ither case. Said that, the logics in there (especially around the cleanups on virtio_fs_fill_super() failures) is bloody convoluted, but sorting that out would take a lot more RTFS than I'm willing to start right now. In any case, this patch does not fix any

Re: [PATCH 4/9] drm: remove the drm file system

2021-03-10 Thread Al Viro
On Tue, Mar 09, 2021 at 04:53:43PM +0100, Christoph Hellwig wrote: > Just use the generic anon_inode file system. Are you changing the lifetime rules for that module? ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH 3/9] powerpc/pseries: remove the ppc-cmm file system

2021-03-10 Thread Al Viro
On Tue, Mar 09, 2021 at 04:53:42PM +0100, Christoph Hellwig wrote: > Just use the generic anon_inode file system. Umm... The only problem I see here is the lifetime rules for that module, and that's not something introduced in this patchset. Said that, looks like the logics around that place is

Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Al Viro
On Fri, Nov 02, 2018 at 10:15:56AM -0700, Linus Torvalds wrote: > On Fri, Nov 2, 2018 at 10:10 AM Linus Torvalds > wrote: > > > > Don't you take over the VM with "use_mm()" when you do the copies? So > > yes, it's a kernel thread, but it has a user VM, and though that > > should have the user

Re: KMSAN: uninit-value in _copy_to_iter (2)

2018-06-07 Thread Al Viro
On Thu, Jun 07, 2018 at 08:59:06PM +0300, Michael S. Tsirkin wrote: > On Thu, Jun 07, 2018 at 06:43:55PM +0100, Al Viro wrote: > > On Thu, Jun 07, 2018 at 06:38:48PM +0300, Michael S. Tsirkin wrote: > > > #syz test: https://github.com/googl

Re: KMSAN: uninit-value in _copy_to_iter (2)

2018-06-07 Thread Al Viro
On Thu, Jun 07, 2018 at 06:38:48PM +0300, Michael S. Tsirkin wrote: > #syz test: https://github.com/google/kmsan.git/master > d2d741e5d1898dfde1a75ea3d29a9a3e2edf0617 > > Subject: vhost: fix info leak > > Fixes: CVE-2018-1118 > Signed-off-by: Michael S. Tsirkin > --- > diff --git

Re: [PATCH v1 03/19] fs/anon_inodes: new interface to create new inode

2016-03-11 Thread Al Viro
On Fri, Mar 11, 2016 at 04:30:07PM +0900, Minchan Kim wrote: > From: Gioh Kim > > The anon_inodes has already complete interfaces to create manage > many anonymous inodes but don't have interface to get > new inode. Other sub-modules can create anonymous inode > without

Re: [PATCH for-3.19] vhost/net: fix up num_buffers endian-ness

2015-02-04 Thread Al Viro
On Wed, Feb 04, 2015 at 01:59:42PM -0800, David Miller wrote: From: Michael S. Tsirkin m...@redhat.com Date: Tue, 3 Feb 2015 11:07:06 +0200 In virtio 1.0 mode, when mergeable buffers are enabled on a big-endian host, num_buffers wasn't byte-swapped correctly, so large incoming packets

[PATCH v3 15/18] vhost: switch vhost get_indirect() to iov_iter, kill memcpy_fromiovec()

2015-02-03 Thread Al Viro
From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: k...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- drivers/vhost/vhost.c | 6 -- include/linux/uio.h | 1 - lib/iovec.c | 25

[PATCH v3 16/18] vhost: don't bother with copying iovec in handle_tx()

2015-02-03 Thread Al Viro
From: Al Viro v...@zeniv.linux.org.uk just advance the msg.msg_iter and be done with that. Cc: Michael S. Tsirkin m...@redhat.com Cc: k...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- drivers/vhost/net.c | 9 + 1 file

[PATCH v3 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Al Viro
From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: k...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- drivers/vhost/net.c | 82 +++-- include/linux

[PATCH v3 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()

2015-02-03 Thread Al Viro
From: Al Viro v...@zeniv.linux.org.uk it has just verified that it asks no more than the length of the first segment of iovec. And with that the last user of stuff in lib/iovec.c is gone. RIP. Cc: Michael S. Tsirkin m...@redhat.com Cc: Nicholas A. Bellinger n...@linux-iscsi.org Cc: k

Re: [patch 1/2] vhost: potential integer overflows

2010-10-12 Thread Al Viro
On Mon, Oct 11, 2010 at 07:22:57PM +0200, Dan Carpenter wrote: I did an audit for potential integer overflows of values which get passed to access_ok() and here are the results. FWIW, UINT_MAX is wrong here. What you want is maximal size_t value. Signed-off-by: Dan Carpenter

Re: [PATCH 2/5] lguest guest feedback tidyups

2007-05-13 Thread Al Viro
On Fri, May 11, 2007 at 11:21:30AM +1000, Rusty Russell wrote: /* Devices are in page above top of normal mem. */ - lguest_devices = ioremap(max_pfn PAGE_SHIFT, PAGE_SIZE); + lguest_devices = (__force void*)ioremap(max_pfnPAGE_SHIFT,PAGE_SIZE); Er... What's being done here?