Re: [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Randy Dunlap
On 6/28/19 5:44 AM, Christoph Hellwig wrote: > On Fri, Jun 28, 2019 at 12:39:52PM +0200, Arnd Bergmann wrote: >> Not all architectures support get_user() with a 64-bit argument: > > Which architectures are still missing? I think we finally need to > get everyone in line instead of repeatedly work

[f2fs-dev] [PATCH 3/4] vfs: flush and wait for io when setting the immutable flag via FSSETXATTR

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong When we're using FS_IOC_FSSETXATTR to set the immutable flag on a file, we need to ensure that userspace can't continue to write the file after the file becomes immutable. To make that happen, we have to flush all the dirty pagecache pages to disk to ensure that we can fail

[f2fs-dev] [PATCH v4 0/5] vfs: clean up SETFLAGS and FSSETXATTR option processing

2019-06-28 Thread Darrick J. Wong
Hi all, The FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctls were promoted from ext4 and XFS, respectively, into the VFS. However, we didn't promote any of the parameter checking code from those filesystems, which lead to a mess where each filesystem open-codes whatever parameter checks they want and

[f2fs-dev] [PATCH 1/4] mm/fs: don't allow writes to immutable files

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong The chattr manpage has this to say about immutable files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the file can not be opened in write mode."

[f2fs-dev] [PATCH 2/4] vfs: flush and wait for io when setting the immutable flag via SETFLAGS

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong When we're using FS_IOC_SETFLAGS to set the immutable flag on a file, we need to ensure that userspace can't continue to write the file after the file becomes immutable. To make that happen, we have to flush all the dirty pagecache pages to disk to ensure that we can fail a

[f2fs-dev] [PATCH 4/4] vfs: don't allow most setxattr to immutable files

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong The chattr manpage has this to say about immutable files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the file can not be opened in write mode."

[f2fs-dev] [PATCH v6 0/4] vfs: make immutable files actually immutable

2019-06-28 Thread Darrick J. Wong
Hi all, The chattr(1) manpage has this to say about the immutable bit that system administrators can set on files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the file

[f2fs-dev] [PATCH 5/5] vfs: only allow FSSETXATTR to set DAX flag on files and dirs

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong The DAX flag only applies to files and directories, so don't let it get set for other types of files. Signed-off-by: Darrick J. Wong --- fs/inode.c |8 1 file changed, 8 insertions(+) diff --git a/fs/inode.c b/fs/inode.c index 670d5408d022..f08711b34341 100

[f2fs-dev] [PATCH 4/5] vfs: teach vfs_ioc_fssetxattr_check to check extent size hints

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Move the extent size hint checks that aren't xfs-specific to the vfs. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/inode.c | 18 + fs/xfs/xfs_ioctl.c | 70 ++-- 2 files changed, 47 ins

[f2fs-dev] [PATCH 1/5] vfs: create a generic checking and prep function for FS_IOC_SETFLAGS

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic function to check incoming FS_IOC_SETFLAGS flag values and later prepare the inode for updates so that we can standardize the implementations that follow ext4's flag values. Note that the efivarfs implementation no longer fails a no-op SETFLAGS without CAP_

[f2fs-dev] [PATCH 2/5] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/btrfs/ioctl.c | 17 + fs/ext4/ioctl.c|

[f2fs-dev] [PATCH 3/5] vfs: teach vfs_ioc_fssetxattr_check to check project id info

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Standardize the project id checks for FSSETXATTR. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/ext4/ioctl.c| 27 --- fs/f2fs/file.c | 27 --- fs/inode.c | 13 + fs/xfs/xfs_io

Re: [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Russell King - ARM Linux admin
On Fri, Jun 28, 2019 at 04:46:14PM +0200, Arnd Bergmann wrote: > On Fri, Jun 28, 2019 at 3:17 PM Christoph Hellwig wrote: > > > > On Fri, Jun 28, 2019 at 03:09:47PM +0200, Arnd Bergmann wrote: > > > I came across this on arm-nommu (which disables > > > CONFIG_CPU_SPECTRE) during randconfig testing

Re: [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Jaegeuk Kim
Hi Arnd, If you don't mind, can I integrate this into the original patch in the queue? Thanks, On 06/28, Arnd Bergmann wrote: > Not all architectures support get_user() with a 64-bit argument: > > ERROR: "__get_user_bad" [fs/f2fs/f2fs.ko] undefined! > > Use copy_from_user() here, this will alw

Re: [PATCH v2] f2fs: allocate blocks for pinned file

2019-06-28 Thread Jaegeuk Kim
This patch allows fallocate to allocate physical blocks for pinned file. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 25 + fs/f2fs/file.c | 7 ++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Documentation

Re: [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Arnd Bergmann
On Fri, Jun 28, 2019 at 3:17 PM Christoph Hellwig wrote: > > On Fri, Jun 28, 2019 at 03:09:47PM +0200, Arnd Bergmann wrote: > > I came across this on arm-nommu (which disables > > CONFIG_CPU_SPECTRE) during randconfig testing. > > > > I don't see an easy way to add this in there, short of rewritin

Re: [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Christoph Hellwig
On Fri, Jun 28, 2019 at 03:09:47PM +0200, Arnd Bergmann wrote: > I came across this on arm-nommu (which disables > CONFIG_CPU_SPECTRE) during randconfig testing. > > I don't see an easy way to add this in there, short of rewriting the > whole __get_user_err() function. Any suggestions? Can't we j

Re: [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Arnd Bergmann
On Fri, Jun 28, 2019 at 2:44 PM Christoph Hellwig wrote: > > On Fri, Jun 28, 2019 at 12:39:52PM +0200, Arnd Bergmann wrote: > > Not all architectures support get_user() with a 64-bit argument: > > Which architectures are still missing? I think we finally need to > get everyone in line instead of

Re: [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Christoph Hellwig
On Fri, Jun 28, 2019 at 12:39:52PM +0200, Arnd Bergmann wrote: > Not all architectures support get_user() with a 64-bit argument: Which architectures are still missing? I think we finally need to get everyone in line instead of repeatedly working around the lack of minor arch support.

[f2fs-dev] [PATCH] f2fs: fix 32-bit linking

2019-06-28 Thread Arnd Bergmann
Not all architectures support get_user() with a 64-bit argument: ERROR: "__get_user_bad" [fs/f2fs/f2fs.ko] undefined! Use copy_from_user() here, this will always work. Fixes: d2ae7494d043 ("f2fs: ioctl for removing a range from F2FS") Signed-off-by: Arnd Bergmann --- fs/f2fs/file.c | 3 ++- 1

Re: Next 20190621: fails to link f2fs in x86-32

2019-06-28 Thread Pavel Machek
On Mon 2019-06-24 10:20:52, Stephen Rothwell wrote: > Hi all, > > On Sat, 22 Jun 2019 19:49:45 +0200 Pavel Machek wrote: > > > > ld: fs/f2fs/gc.o: in function `f2fs_resize_fs': > > gc.c:(.text+0x3a91): undefined reference to `__umoddi3' > > ld: gc.c:(.text+0x3b70): undefined reference to `__udivd