Re: [PATCH v2 3/6] virtiofs: factor out more common methods for argbuf

2024-03-01 Thread Miklos Szeredi
On Wed, 28 Feb 2024 at 15:41, Hou Tao wrote: > > From: Hou Tao > > Factor out more common methods for bounce buffer of fuse args: > > 1) virtio_fs_argbuf_setup_sg: set-up sgs for bounce buffer > 2) virtio_fs_argbuf_copy_from_in_arg: copy each in-arg to bounce buffer > 3)

Re: [PATCH v2 1/6] fuse: limit the length of ITER_KVEC dio by max_pages

2024-03-01 Thread Miklos Szeredi
On Wed, 28 Feb 2024 at 15:40, Hou Tao wrote: > So instead of limiting both the values of max_read and max_write in > kernel, capping the maximal length of kvec iter IO by using max_pages in > fuse_direct_io() just like it does for ubuf/iovec iter IO. Now the max > value for max_pages is 256, so

Re: [PATCH] virtiofs: limit the length of ITER_KVEC dio by max_nopage_rw

2024-02-23 Thread Miklos Szeredi
On Wed, 3 Jan 2024 at 11:58, Hou Tao wrote: > > From: Hou Tao > > When trying to insert a 10MB kernel module kept in a virtiofs with cache > disabled, the following warning was reported: > > [ cut here ] > WARNING: CPU: 2 PID: 439 at mm/page_alloc.c:4544 .. >

Re: [PATCH v2 09/11] fuse: file: limit splice_read to virtiofs

2024-01-10 Thread Miklos Szeredi
On Wed, 10 Jan 2024 at 16:19, Ahelenia Ziemiańska wrote: > > We need to find an alternative to refusing splice, since this is not > > going to fly, IMO. > The alternative is to not hold the lock. See the references in the > cover letter for why this wasn't done. IMO a potential slight perf > hit

Re: [PATCH v2 09/11] fuse: file: limit splice_read to virtiofs

2024-01-10 Thread Miklos Szeredi
On Thu, 21 Dec 2023 at 04:09, Ahelenia Ziemiańska wrote: > > Potentially-blocking splice_reads are allowed for normal filesystems > like NFS because they're blessed by root. > > FUSE is commonly used suid-root, and allows anyone to trivially create > a file that, when spliced from, will just

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Miklos Szeredi
On Wed, Apr 14, 2021 at 2:22 PM Peng Tao wrote: > > > --- a/fs/fuse/file.c > > +++ b/fs/fuse/file.c > > @@ -1117,17 +1117,12 @@ static ssize_t fuse_send_write_pages(str > > count = ia->write.out.size; > > for (i = 0; i < ap->num_pages; i++) { > > struct page *page =

Re: [PATCH v2 0/2] fuse: Fix clearing SGID when access ACL is set

2021-04-14 Thread Miklos Szeredi
On Thu, Mar 25, 2021 at 4:19 PM Vivek Goyal wrote: > > > Hi, > > This is V2 of the patchset. Posted V1 here. > > https://lore.kernel.org/linux-fsdevel/20210319195547.427371-1-vgo...@redhat.com/ > > Changes since V1: > > - Dropped the helper to determine if SGID should be cleared and open >

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Miklos Szeredi
On Wed, Apr 14, 2021 at 11:22 AM Baolin Wang wrote: > > > > 在 2021/4/14 17:02, Miklos Szeredi 写道: > > On Wed, Apr 14, 2021 at 10:42 AM Baolin Wang > > wrote: > > > >> Sorry I missed this patch before, and I've tested this patch, it seems > &g

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Miklos Szeredi
On Wed, Apr 14, 2021 at 10:42 AM Baolin Wang wrote: > Sorry I missed this patch before, and I've tested this patch, it seems > can solve the deadlock issue I met before. Great, thanks for testing. > But look at this patch in detail, I think this patch only reduced the > deadlock window, but

Re: [PATCH v3 01/18] vfs: add fileattr ops

2021-04-13 Thread Miklos Szeredi
On Tue, Apr 13, 2021 at 4:46 PM Matthew Wilcox wrote: > > On Thu, Mar 25, 2021 at 08:37:38PM +0100, Miklos Szeredi wrote: > > @@ -107,6 +110,8 @@ fiemap: no > > update_time: no > > atomic_open: shared (exclusive if O_CREAT is set in open flags) > > tmp

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-04-13 Thread Miklos Szeredi
On Thu, Feb 11, 2021 at 7:09 PM Miklos Szeredi wrote: > > Pushed to > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#fs_fuse_split > > There's still room for improvement, but I guess this can wait after > MUSE integration. Hi Richard, Have you ha

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-13 Thread Miklos Szeredi
On Mon, Apr 12, 2021 at 3:23 PM Baolin Wang wrote: > > Hi Miklos, > > 在 2021/3/27 14:36, Baolin Wang 写道: > > We can meet below deadlock scenario when writing back dirty pages, and > > writing files at the same time. The deadlock scenario can be reproduced > > by: > > > > - A writeback worker

Re: [PATCH v2] virtiofs: fix memory leak in virtio_fs_probe()

2021-04-12 Thread Miklos Szeredi
On Wed, Mar 17, 2021 at 9:43 AM Luis Henriques wrote: > > When accidentally passing twice the same tag to qemu, kmemleak ended up > reporting a memory leak in virtiofs. Also, looking at the log I saw the > following error (that's when I realised the duplicated tag): > > virtiofs: probe of

Re: linux-next: build warning after merge of the vfs tree

2021-04-12 Thread Miklos Szeredi
Hi Al, Fixed fileattr branch pushed to: git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git fileattr_v6 Thanks, Miklos On Mon, Apr 12, 2021 at 1:47 PM Stephen Rothwell wrote: > > Hi all, > > After merging the vfs tree, today's linux-next build (htmldocs) produced > this warning:

Re: [PATCH] vfs: allow stacked ->get_acl() in RCU lookup

2021-04-12 Thread Miklos Szeredi
On Tue, Mar 23, 2021 at 5:07 PM Miklos Szeredi wrote: > > Overlayfs does not cache ACL's to avoid double caching with all its > problems. Instead it just calls the underlying filesystem's > i_op->get_acl(), which will return the cached value, if possible. > > In r

Re: [PATCH v1] ovl: Fix leaked dentry

2021-04-08 Thread Miklos Szeredi
oup_exit+0x135/0x380 >__do_sys_exit_group.isra.0+0x20/0x20 >__x64_sys_exit_group+0x3c/0x50 >do_syscall_64+0x45/0x70 >entry_SYSCALL_64_after_hwframe+0x44/0xae > ... > VFS: Busy inodes after unmount of overlay. Self-destruct in 5 seconds. > Have a nice day...

[GIT PULL] fileattr API

2021-04-07 Thread Miklos Szeredi
v1: - rebased on 5.12-rc1 (mnt_userns churn) - fixed LSM hook on overlayfs ---- Miklos Szeredi (23): vfs: add fileattr ops ecryptfs: stack fileattr ops ovl: stack fileattr ops btrfs: convert to fileattr ext2: conv

Re: linux-next: build warning after merge of the overlayfs tree

2021-03-29 Thread Miklos Szeredi
On Mon, Mar 29, 2021 at 11:14 AM Stephen Rothwell wrote: > > Hi all, > > After merging the overlayfs tree, today's linux-next build (htmldocs) Hi Stephen, I think you mixed up drivers/of/overlay.c with fs/overlay/. Thanks, Miklos

Re: [PATCH v3 03/18] ovl: stack fileattr ops

2021-03-29 Thread Miklos Szeredi
On Sun, Mar 28, 2021 at 8:09 PM Al Viro wrote: > > On Thu, Mar 25, 2021 at 08:37:40PM +0100, Miklos Szeredi wrote: > > Add stacking for the fileattr operations. > > > > Add hack for calling security_file_ioctl() for now. Probably better to > > have a pair of speci

Re: [PATCH v3 01/18] vfs: add fileattr ops

2021-03-29 Thread Miklos Szeredi
On Sun, Mar 28, 2021 at 8:08 PM Al Viro wrote: > > On Thu, Mar 25, 2021 at 08:37:38PM +0100, Miklos Szeredi wrote: > > > +int vfs_fileattr_get(struct dentry *dentry, struct fileattr *fa) > > +{ > > + struct inode *inode = d_inode(dentry); > > +

[PATCH v3 06/18] ext4: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: "Theodore Ts'o" --- fs/ext4/ext4.h | 12 +-- fs/ext4/file.c | 2 + fs/ext4/ioctl.c | 208 ++-- fs/ext4/namei.c

[PATCH v3 04/18] btrfs: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: David Sterba --- fs/btrfs/ctree.h | 3 + fs/btrfs/inode.c | 4 + fs/btrfs/ioctl.c | 226 +++ 3 files changed, 41 insertions

[PATCH v3 07/18] f2fs: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jaegeuk Kim --- fs/f2fs/f2fs.h | 3 + fs/f2fs/file.c | 216 +--- fs/f2fs/namei.c | 2 + 3 files changed, 43 insertions

[PATCH v3 01/18] vfs: add fileattr ops

2021-03-25 Thread Miklos Szeredi
all filesystems are converted, the fallback can be removed. 32bit compat ioctls are now handled by the generic code as well. Signed-off-by: Miklos Szeredi --- Documentation/filesystems/locking.rst | 5 + Documentation/filesystems/vfs.rst | 15 ++ fs/ioctl.c

[PATCH v3 03/18] ovl: stack fileattr ops

2021-03-25 Thread Miklos Szeredi
Add stacking for the fileattr operations. Add hack for calling security_file_ioctl() for now. Probably better to have a pair of specific hooks for these operations. Signed-off-by: Miklos Szeredi --- fs/overlayfs/dir.c | 2 ++ fs/overlayfs/inode.c | 77

[PATCH v3 02/18] ecryptfs: stack fileattr ops

2021-03-25 Thread Miklos Szeredi
Add stacking for the fileattr operations. Signed-off-by: Miklos Szeredi Cc: Tyler Hicks --- fs/ecryptfs/inode.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 18e9285fbb4c..7169ea873347 100644 --- a/fs/ecryptfs

[PATCH v3 18/18] vfs: remove unused ioctl helpers

2021-03-25 Thread Miklos Szeredi
Remove vfs_ioc_setflags_prepare(), vfs_ioc_fssetxattr_check() and simple_fill_fsxattr(), which are no longer used. Signed-off-by: Miklos Szeredi Reviewed-by: Darrick J. Wong --- fs/inode.c | 87 -- include/linux/fs.h | 12 --- 2 files

[PATCH v3 15/18] ocfs2: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Joel Becker --- fs/ocfs2/file.c| 2 ++ fs/ocfs2/ioctl.c | 59 ++ fs/ocfs2/ioctl.h | 3 +++ fs/ocfs2/namei.c

[PATCH v3 17/18] ubifs: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Richard Weinberger --- fs/ubifs/dir.c | 2 ++ fs/ubifs/file.c | 2 ++ fs/ubifs/ioctl.c | 74 fs/ubifs/ubifs.h | 3

[PATCH v3 16/18] reiserfs: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jan Kara --- fs/reiserfs/file.c | 2 + fs/reiserfs/ioctl.c| 121 +++-- fs/reiserfs/namei.c| 2 + fs/reiserfs/reiserfs.h

[PATCH v3 14/18] nilfs2: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Ryusuke Konishi --- fs/nilfs2/file.c | 2 ++ fs/nilfs2/ioctl.c | 61 ++- fs/nilfs2/namei.c | 2 ++ fs/nilfs2/nilfs.h | 3

[PATCH v3 10/18] xfs: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Darrick J. Wong --- fs/xfs/libxfs/xfs_fs.h | 4 - fs/xfs/xfs_ioctl.c | 252 + fs/xfs/xfs_ioctl.h | 11 ++ fs/xfs

[PATCH v3 11/18] efivars: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Matthew Garrett --- fs/efivarfs/file.c | 77 - fs/efivarfs/inode.c | 44 ++ 2 files changed, 44

[PATCH v3 09/18] orangefs: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Mike Marshall --- fs/orangefs/file.c | 79 - fs/orangefs/inode.c | 50 2 files changed, 50

[PATCH v3 12/18] hfsplus: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi --- fs/hfsplus/dir.c| 2 + fs/hfsplus/hfsplus_fs.h | 14 ++- fs/hfsplus/inode.c | 54 ++ fs/hfsplus/ioctl.c | 84

[PATCH v3 13/18] jfs: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Dave Kleikamp --- fs/jfs/file.c | 6 +-- fs/jfs/ioctl.c | 105 ++-- fs/jfs/jfs_dinode.h | 7 --- fs/jfs/jfs_inode.h

[PATCH v3 05/18] ext2: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jan Kara --- fs/ext2/ext2.h | 7 ++-- fs/ext2/file.c | 2 ++ fs/ext2/ioctl.c | 88 ++--- fs/ext2/namei.c | 2 ++ 4 files

[PATCH v3 08/18] gfs2: convert to fileattr

2021-03-25 Thread Miklos Szeredi
Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Andreas Gruenbacher --- fs/gfs2/file.c | 57 - fs/gfs2/inode.c | 4 fs/gfs2/inode.h | 3 +++ 3 files changed, 21

[PATCH v3 00/18] new kAPI for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

2021-03-25 Thread Miklos Szeredi
here: git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git#fileattr_v3 Miklos Szeredi (18): vfs: add fileattr ops ecryptfs: stack fileattr ops ovl: stack fileattr ops btrfs: convert to fileattr ext2: convert to fileattr ext4: convert to fileattr f2fs: convert to fileattr gfs2: conver

Re: [PATCH 01/18] vfs: add miscattr ops

2021-03-25 Thread Miklos Szeredi
On Tue, Mar 23, 2021 at 1:24 AM Eric Biggers wrote: > > +int vfs_miscattr_set(struct dentry *dentry, struct miscattr *ma) > > +{ > > + struct inode *inode = d_inode(dentry); > > + struct miscattr old_ma = {}; > > + int err; > > + > > + if (d_is_special(dentry)) > > +

Re: [PATCH 2/3] virtiofs: split requests that exceed virtqueue size

2021-03-24 Thread Miklos Szeredi
On Wed, Mar 24, 2021 at 4:09 PM Connor Kuehl wrote: > > On 3/18/21 10:17 AM, Miklos Szeredi wrote: > > I removed the conditional compilation and renamed the limit. Also made > > virtio_fs_get_tree() bail out if it hit the WARN_ON(). Updated patch below. > > Hi Miklos,

Re: [fuse-devel] [PATCH] fuse: avoid deadlock when write fuse inode

2021-03-24 Thread Miklos Szeredi
On Tue, Feb 2, 2021 at 5:41 AM Huang Jianan via fuse-devel wrote: > > We found the following deadlock situations in low memory scenarios: > Thread A Thread B > - __writeback_single_inode > - fuse_write_inode > - fuse_simple_request >- __fuse_request_send > -

Re: [PATCH v2 01/18] vfs: add miscattr ops

2021-03-24 Thread Miklos Szeredi
On Wed, Mar 24, 2021 at 1:28 PM Al Viro wrote: > > On Wed, Mar 24, 2021 at 09:45:02AM +0100, Miklos Szeredi wrote: > > Isn't structure initialization supposed to zero everything not > > explicitly initialized? > > All fields, but not the padding... Ah... while t

Re: [syzbot] INFO: task hung in walk_component (2)

2021-03-24 Thread Miklos Szeredi
#syz fix: fuse: fix live lock in fuse_iget()

Re: [PATCH v2 01/18] vfs: add miscattr ops

2021-03-24 Thread Miklos Szeredi
On Wed, Mar 24, 2021 at 6:03 AM Al Viro wrote: > > On Mon, Mar 22, 2021 at 03:48:59PM +0100, Miklos Szeredi wrote: > > minor nit: copy_fsxattr_{to,from}_user() might be better. > > > +int fsxattr_copy_to_user(const struct miscattr *ma, struct fsxattr __user > > *u

[PATCH] vfs: allow stacked ->get_acl() in RCU lookup

2021-03-23 Thread Miklos Szeredi
eric case of a cache miss, only in case of ACL_DONT_CACHE. Reported-by: garyhuang Signed-off-by: Miklos Szeredi --- fs/9p/acl.c | 2 +- fs/9p/acl.h | 2 +- fs/bad_inode.c| 2 +- fs/btrfs/acl.c| 2 +- fs/btrfs/ctree.h

Re: [PATCH] fs/fuse: Fix matching of FUSE_DEV_IOC_CLONE command

2021-03-22 Thread Miklos Szeredi
On Fri, Mar 19, 2021 at 4:06 PM Alessio Balsini wrote: > > With commit f8425c939663 ("fuse: 32-bit user space ioctl compat for fuse > device") the matching constraints for the FUSE_DEV_IOC_CLONE ioctl > command are relaxed, limited to the testing of command type and number. > As Arnd noticed,

[PATCH v2 17/18] ubifs: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Richard Weinberger --- fs/ubifs/dir.c | 2 ++ fs/ubifs/file.c | 2 ++ fs/ubifs/ioctl.c | 74 fs/ubifs/ubifs.h | 3

[PATCH v2 18/18] vfs: remove unused ioctl helpers

2021-03-22 Thread Miklos Szeredi
Remove vfs_ioc_setflags_prepare(), vfs_ioc_fssetxattr_check() and simple_fill_fsxattr(), which are no longer used. Signed-off-by: Miklos Szeredi --- fs/inode.c | 87 -- include/linux/fs.h | 12 --- 2 files changed, 99 deletions(-) diff

[PATCH v2 16/18] reiserfs: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jan Kara --- fs/reiserfs/file.c | 2 + fs/reiserfs/ioctl.c| 121 +++-- fs/reiserfs/namei.c| 2 + fs/reiserfs/reiserfs.h

[PATCH v2 15/18] ocfs2: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Joel Becker --- fs/ocfs2/file.c| 2 ++ fs/ocfs2/ioctl.c | 59 ++ fs/ocfs2/ioctl.h | 3 +++ fs/ocfs2/namei.c

[PATCH v2 10/18] xfs: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Darrick J. Wong --- fs/xfs/libxfs/xfs_fs.h | 4 - fs/xfs/xfs_ioctl.c | 316 - fs/xfs/xfs_ioctl.h | 11 ++ fs/xfs

[PATCH v2 14/18] nilfs2: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Ryusuke Konishi --- fs/nilfs2/file.c | 2 ++ fs/nilfs2/ioctl.c | 61 ++- fs/nilfs2/namei.c | 2 ++ fs/nilfs2/nilfs.h | 3

[PATCH v2 13/18] jfs: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Dave Kleikamp --- fs/jfs/file.c | 6 +-- fs/jfs/ioctl.c | 105 ++-- fs/jfs/jfs_dinode.h | 7 --- fs/jfs/jfs_inode.h

[PATCH v2 12/18] hfsplus: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi --- fs/hfsplus/dir.c| 2 + fs/hfsplus/hfsplus_fs.h | 14 ++- fs/hfsplus/inode.c | 54 ++ fs/hfsplus/ioctl.c | 84

[PATCH v2 06/18] ext4: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: "Theodore Ts'o" --- fs/ext4/ext4.h | 12 +-- fs/ext4/file.c | 2 + fs/ext4/ioctl.c | 210 ++-- fs/ext4/namei.c

[PATCH v2 05/18] ext2: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jan Kara --- fs/ext2/ext2.h | 7 ++-- fs/ext2/file.c | 2 ++ fs/ext2/ioctl.c | 88 ++--- fs/ext2/namei.c | 2 ++ 4 files

[PATCH v2 08/18] gfs2: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Andreas Gruenbacher --- fs/gfs2/file.c | 57 - fs/gfs2/inode.c | 4 fs/gfs2/inode.h | 3 +++ 3 files changed, 21

[PATCH v2 11/18] efivars: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Matthew Garrett --- fs/efivarfs/file.c | 77 - fs/efivarfs/inode.c | 44 ++ 2 files changed, 44

[PATCH v2 03/18] ovl: stack miscattr ops

2021-03-22 Thread Miklos Szeredi
Add stacking for the miscattr operations. Add hack for calling security_file_ioctl() for now. Probably better to have a pair of specific hooks for these operations. Signed-off-by: Miklos Szeredi --- fs/overlayfs/dir.c | 2 ++ fs/overlayfs/inode.c | 77

[PATCH v2 04/18] btrfs: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: David Sterba --- fs/btrfs/ctree.h | 3 + fs/btrfs/inode.c | 4 + fs/btrfs/ioctl.c | 249 +-- 3 files changed, 52 insertions

[PATCH v2 02/18] ecryptfs: stack miscattr ops

2021-03-22 Thread Miklos Szeredi
Add stacking for the miscattr operations. Signed-off-by: Miklos Szeredi Cc: Tyler Hicks --- fs/ecryptfs/inode.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 18e9285fbb4c..b7d18583c50f 100644 --- a/fs/ecryptfs

[PATCH v2 07/18] f2fs: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jaegeuk Kim --- fs/f2fs/f2fs.h | 3 + fs/f2fs/file.c | 213 fs/f2fs/namei.c | 2 + 3 files changed, 40 insertions

[PATCH v2 09/18] orangefs: convert to miscattr

2021-03-22 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Mike Marshall --- fs/orangefs/file.c | 79 - fs/orangefs/inode.c | 50 2 files changed, 50

[PATCH v2 01/18] vfs: add miscattr ops

2021-03-22 Thread Miklos Szeredi
all filesystems are converted, the fallback can be removed. 32bit compat ioctls are now handled by the generic code as well. Signed-off-by: Miklos Szeredi --- Documentation/filesystems/locking.rst | 5 + Documentation/filesystems/vfs.rst | 15 ++ fs/ioctl.c

[PATCH v2 00/18] new kAPI for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

2021-03-22 Thread Miklos Szeredi
on 5.12-rc1 (mnt_userns churn) - fixed LSM hook on overlayfs Git tree is available here: git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git#miscattr_v2 Thanks, Miklos --- Miklos Szeredi (18): vfs: add miscattr ops ecryptfs: stack miscattr ops ovl: stack miscattr ops btrfs

Re: [PATCH 2/3] virtiofs: split requests that exceed virtqueue size

2021-03-18 Thread Miklos Szeredi
it is decomposed into a scattergather list and avoid violating section 2.6.5.3.1 of the virtio spec. Signed-off-by: Connor Kuehl Signed-off-by: Miklos Szeredi --- fs/fuse/fuse_i.h|3 +++ fs/fuse/inode.c |3 ++- fs/fuse/virtio_fs.c | 19 +-- 3 files changed, 22 insert

Re: fuse: kernel BUG at mm/truncate.c:763!

2021-03-18 Thread Miklos Szeredi
[CC linux-mm] On Thu, Mar 18, 2021 at 10:25 AM Luis Henriques wrote: > > (I thought Vlastimil was already on CC...) > > On Mon, Mar 15, 2021 at 11:06:59AM +, Matthew Wilcox wrote: > > On Mon, Mar 15, 2021 at 09:47:45AM +, Luis Henriques wrote: > > > On Fri, Mar 12, 2021 at 01:11:23PM

[GIT PULL] fuse fixes for 5.12-rc4

2021-03-16 Thread Miklos Szeredi
Hi Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git tags/fuse-fixes-5.12-rc4 Fix a deadlock and a couple of other bugs. Thanks, Miklos Alessio Balsini (1): fuse: 32-bit user space

Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list

2021-03-15 Thread Miklos Szeredi
On Mon, Mar 15, 2021 at 2:41 PM David Howells wrote: > > Miklos Szeredi wrote: > > > > (2) We can use the file position to represent the mnt_id and can jump to > > > it directly - ie. using seek() to jump to a mount object by its ID. > > > > W

Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list

2021-03-15 Thread Miklos Szeredi
On Mon, Mar 15, 2021 at 1:07 PM David Howells wrote: > > > Hi Al, Miklós, > > Can we consider replacing the "insert cursor" approach we're currently > using for proc files to scan the current namespace's mount list[1] with > something that uses an xarray of mounts indexed by mnt_id? > > This has

Re: fuse: kernel BUG at mm/truncate.c:763!

2021-03-12 Thread Miklos Szeredi
On Fri, Mar 12, 2021 at 9:51 AM Luis Henriques wrote: > > Hi Miklos, > > I've seen a bug report (5.10.16 kernel splat below) that seems to be > reproducible in kernels as early as 5.4. > > The commit that caught my attention when looking at what was merged in 5.4 > was e4648309b85a ("fuse:

Re: [RFC PATCH] fuse: Clear SGID bit when setting mode in setacl

2021-03-03 Thread Miklos Szeredi
On Tue, Mar 2, 2021 at 5:26 PM Vivek Goyal wrote: > > I still feel that it should probably be fixed in virtiofsd, given fuse > > client > > is expecting file server to take care of any change of mode (file > > permission bits). > > Havid said that, there is one disadvantage of relying on server

Re: [PATCH RESEND V12 3/8] fuse: Definitions and ioctl for passthrough

2021-02-19 Thread Miklos Szeredi
On Fri, Feb 19, 2021 at 8:05 AM Peng Tao wrote: > > On Wed, Feb 17, 2021 at 9:41 PM Miklos Szeredi wrote: > > What I think would be useful is to have an explicit > > FUSE_DEV_IOC_PASSTHROUGH_CLOSE ioctl, that would need to be called > > once the fuse server

Re: [PATCH RESEND V12 8/8] fuse: Introduce passthrough for mmap

2021-02-17 Thread Miklos Szeredi
On Mon, Jan 25, 2021 at 4:31 PM Alessio Balsini wrote: > > Enabling FUSE passthrough for mmap-ed operations not only affects > performance, but has also been shown as mandatory for the correct > functioning of FUSE passthrough. > yanwu noticed [1] that a FUSE file with passthrough enabled may

Re: [PATCH RESEND V12 5/8] fuse: Introduce synchronous read and write for passthrough

2021-02-17 Thread Miklos Szeredi
On Mon, Jan 25, 2021 at 4:31 PM Alessio Balsini wrote: > > All the read and write operations performed on fuse_files which have the > passthrough feature enabled are forwarded to the associated lower file > system file via VFS. > > Sending the request directly to the lower file system avoids the

Re: [PATCH RESEND V12 4/8] fuse: Passthrough initialization and release

2021-02-17 Thread Miklos Szeredi
On Mon, Jan 25, 2021 at 4:31 PM Alessio Balsini wrote: > > Implement the FUSE passthrough ioctl that associates the lower > (passthrough) file system file with the fuse_file. > > The file descriptor passed to the ioctl by the FUSE daemon is used to > access the relative file pointer, that will be

Re: [PATCH RESEND V12 3/8] fuse: Definitions and ioctl for passthrough

2021-02-17 Thread Miklos Szeredi
On Mon, Jan 25, 2021 at 4:31 PM Alessio Balsini wrote: > > Expose the FUSE_PASSTHROUGH interface to user space and declare all the > basic data structures and functions as the skeleton on top of which the > FUSE passthrough functionality will be built. > > As part of this, introduce the new FUSE

Re: [PATCH RESEND V12 2/8] fuse: 32-bit user space ioctl compat for fuse device

2021-02-17 Thread Miklos Szeredi
On Mon, Jan 25, 2021 at 4:31 PM Alessio Balsini wrote: > > With a 64-bit kernel build the FUSE device cannot handle ioctl requests > coming from 32-bit user space. > This is due to the ioctl command translation that generates different > command identifiers that thus cannot be used for direct

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-11 Thread Miklos Szeredi
On Wed, Feb 10, 2021 at 12:16 PM Miklos Szeredi wrote: > > On Wed, Feb 10, 2021 at 11:12 AM Miklos Szeredi wrote: > > > But this is just a start. From the big structures still left in > > CUSE only uses the following fields: > > > > fc: .minor, max_read, max

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-10 Thread Miklos Szeredi
On Wed, Feb 10, 2021 at 11:12 AM Miklos Szeredi wrote: > But this is just a start. From the big structures still left in > CUSE only uses the following fields: > > fc: .minor, max_read, max_write, rcu, release, initialized, num_waiting > fm: .fc > ff: .fm > fud: .fc > &

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-10 Thread Miklos Szeredi
On Tue, Feb 9, 2021 at 10:39 PM Richard Weinberger wrote: > > Miklos, > > - Ursprüngliche Mail - > > If you look at fuse_do_ioctl() it does variable length input and > > output at the same time. I guess you need something similar to that. > > I'm not sure whether I understand correctly.

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-10 Thread Miklos Szeredi
s trivial: create and alloc function for the fm, and create accessor functions for the accessed fields. Dealing with fc properly is probably a bit more involved, but does not seem to be too compex at first glance. Do you want to take a stab at cleaning this up further? Thanks, Miklos commit 6bc38f

Re: [fuse-devel] [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Miklos Szeredi
On Tue, Feb 9, 2021 at 6:46 PM Luca Risolia wrote: > > On 09/02/21 17:50, Richard Weinberger wrote: > > Well, I think having a generic mmap() for CUSE is hard to achieve. > > Hard or not it did work for what I can tell you. I was not the original > author but I certainly contributed with testing

Re: [fuse-devel] [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Miklos Szeredi
On Tue, Feb 9, 2021 at 4:10 PM Luca Risolia wrote: > > Hi guys, > > a bit OT probably: is there any chance for you to also implement mmap() > for CUSE? That would be much appreciated. That's an old one. No, I don't have plans, but patches are welcome, of course. Thanks, Miklos

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Miklos Szeredi
On Mon, Jan 25, 2021 at 12:21 AM Richard Weinberger wrote: > > I'm happy to announce the first non-RFC version of this patch set. > Over the xmas holidays I found some time to experiment with various userspace > implementations of MTDs and gave the kernel side more fine-tuning. > > Rationale: >

Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

2021-02-08 Thread Miklos Szeredi
On Mon, Feb 8, 2021 at 3:02 PM Matthew Wilcox wrote: > > On Mon, Feb 08, 2021 at 09:25:22AM +0100, Miklos Szeredi wrote: > > On Mon, Feb 8, 2021 at 3:00 AM Dave Chinner wrote: > > > > > > On Wed, Feb 03, 2021 at 04:03:06PM +0100, Miklos Szeredi wrote: > >

Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

2021-02-08 Thread Miklos Szeredi
On Mon, Feb 8, 2021 at 3:00 AM Dave Chinner wrote: > > On Wed, Feb 03, 2021 at 04:03:06PM +0100, Miklos Szeredi wrote: > > On Wed, Feb 3, 2021 at 3:56 PM Matthew Wilcox wrote: > > > > > But let's talk specifics. What does CIFS need to contact the server for? >

Re: [PATCH 03/18] ovl: stack miscattr

2021-02-05 Thread Miklos Szeredi
On Fri, Feb 5, 2021 at 12:49 AM Vivek Goyal wrote: > > +int ovl_miscattr_set(struct dentry *dentry, struct miscattr *ma) > > +{ > > + struct inode *inode = d_inode(dentry); > > + struct dentry *upperdentry; > > + const struct cred *old_cred; > > + int err; > > + > > + err =

Re: [PATCH 03/18] ovl: stack miscattr

2021-02-05 Thread Miklos Szeredi
On Fri, Feb 5, 2021 at 4:25 PM Miklos Szeredi wrote: > > On Fri, Feb 5, 2021 at 12:49 AM Vivek Goyal wrote: > > > > +int ovl_miscattr_set(struct dentry *dentry, struct miscattr *ma) > > > +{ > > > + struct inode *inode = d_inode(dentry); &g

[GIT PULL] overlayfs fixes for 5.11-rc7

2021-02-04 Thread Miklos Szeredi
) bug. - Clean up security xattr copy-up (related to a SELinux regression). Thanks, Miklos --- Amir Goldstein (1): ovl: skip getxattr of security labels Liangyan (1): ovl: fix dentry leak in ovl_get_redirect Miklos Szeredi (4): ovl: add warning on user_ns mismatch ovl

Re: [PATCH 01/18] vfs: add miscattr ops

2021-02-03 Thread Miklos Szeredi
On Wed, Feb 3, 2021 at 4:05 PM Jan Kara wrote: [...] > > +/** > > + * miscattr_fill_xflags - initialize miscattr with xflags > > + * @ma: miscattr pointer > > + * @xflags: FS_XFLAG_* flags > > + * > > + * Set ->fsx_xflags, ->xattr_valid and ->flags (translated xflags). All > > + *

Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

2021-02-03 Thread Miklos Szeredi
On Wed, Feb 3, 2021 at 3:56 PM Matthew Wilcox wrote: > But let's talk specifics. What does CIFS need to contact the server for? > Could it be cached earlier? I don't understand what CIFS is doing, and I don't really care. This is the sort of operation where adding a couple of network

Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

2021-02-03 Thread Miklos Szeredi
On Wed, Feb 3, 2021 at 3:28 PM Matthew Wilcox wrote: > > On Wed, Feb 03, 2021 at 03:13:29PM +0100, Miklos Szeredi wrote: > > On Wed, Feb 3, 2021 at 2:58 PM Matthew Wilcox wrote: > > > > > Network filesystems frequently need to use the credentials attached to &

Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

2021-02-03 Thread Miklos Szeredi
On Wed, Feb 3, 2021 at 2:58 PM Matthew Wilcox wrote: > Network filesystems frequently need to use the credentials attached to > a struct file in order to communicate with the server. There's no point > fighting this reality. IDGI. Credentials can be taken from the file and from the task. In

Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

2021-02-03 Thread Miklos Szeredi
On Wed, Feb 3, 2021 at 2:08 PM Matthew Wilcox wrote: > > On Wed, Feb 03, 2021 at 01:40:54PM +0100, Miklos Szeredi wrote: > > This series adds the infrastructure and conversion of filesystems to the > > new API. > > > > Two filesystems are not converted:

[PATCH 07/18] f2fs: convert to miscattr

2021-02-03 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jaegeuk Kim --- fs/f2fs/f2fs.h | 2 + fs/f2fs/file.c | 212 fs/f2fs/namei.c | 2 + 3 files changed, 38 insertions

[PATCH 11/18] efivars: convert to miscattr

2021-02-03 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Matthew Garrett --- fs/efivarfs/file.c | 77 - fs/efivarfs/inode.c | 43 + 2 files changed, 43

[PATCH 10/18] xfs: convert to miscattr

2021-02-03 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Darrick J. Wong --- fs/xfs/libxfs/xfs_fs.h | 4 - fs/xfs/xfs_ioctl.c | 294 - fs/xfs/xfs_ioctl.h | 10 ++ fs/xfs

[PATCH 12/18] hfsplus: convert to miscattr

2021-02-03 Thread Miklos Szeredi
Use the miscattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi --- fs/hfsplus/dir.c| 2 + fs/hfsplus/hfsplus_fs.h | 13 +-- fs/hfsplus/inode.c | 53 ++ fs/hfsplus/ioctl.c | 84

  1   2   3   4   5   6   7   8   9   10   >