[f2fs-dev] Hung task when executing generic/256 test

2018-05-08 Thread Chandan Rajendra
Hi, The following "Hung task" information is seen when executing generic/256 test on next-20180503. [ 1964.025145] F2FS-fs (loop1): Mounted with checkpoint version = 22d8b4fd [ 2212.833962] INFO: task umount:16199 blocked for more than 120 seconds. [ 2212.835736] Tainted: GW

Re: [f2fs-dev] Hung task when executing generic/256 test

2018-05-18 Thread Chandan Rajendra
On Friday, May 18, 2018 6:44:43 AM IST Chao Yu wrote: > On 2018/5/18 8:51, Jaegeuk Kim wrote: > > On 05/08, Chandan Rajendra wrote: > >> Hi, > >> > >> The following "Hung task" information is seen when executing generic/256 > &

Re: [f2fs-dev] [PATCH v2 10/12] ext4: add basic fs-verity support

2018-11-02 Thread Chandan Rajendra
On Friday, November 2, 2018 4:22:28 AM IST Eric Biggers wrote: > From: Eric Biggers > > Add basic fs-verity support to ext4. fs-verity is a filesystem feature > that enables transparent integrity protection and authentication of > read-only files. It uses a dm-verity like mechanism at the file

Re: [f2fs-dev] [PATCH v2 10/12] ext4: add basic fs-verity support

2018-11-05 Thread Chandan Rajendra
On Tuesday, November 6, 2018 6:55:03 AM IST Eric Biggers wrote: > Hi Chandan, > > On Fri, Nov 02, 2018 at 03:13:14PM +0530, Chandan Rajendra wrote: > > On Friday, November 2, 2018 4:22:28 AM IST Eric Biggers wrote: > > > From: Eric Biggers > > > > > >

[f2fs-dev] [PATCH V5 7/9] fsverity: Remove filesystem specific build config option

2018-12-12 Thread Chandan Rajendra
ffects all the filesystems making use of fsverity. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fsverity.rst | 4 ++-- fs/ext4/Kconfig| 20 fs/ext4/ext4.h | 2 -- fs/ext4/

[f2fs-dev] [PATCH V5 8/9] fsverity: Move verity status check to fsverity_file_open

2018-12-12 Thread Chandan Rajendra
Instead of conditionally checking for verity status of an inode before invoking fsverity_file_open(), this commit moves the check inside the definition of fsverity_file_open(). Signed-off-by: Chandan Rajendra (EB: fix the !CONFIG_FS_VERITY case and inline the IS_VERITY() check) Signed-off

[f2fs-dev] [PATCH V5 0/9] Remove fs specific fscrypt and fsverity build config options

2018-12-12 Thread Chandan Rajendra
2. Split code that replaces filesystem specific routines with generic IS_ENCRYPTED() and IS_VERITY() calls into separate patches. Chandan Rajendra (9): ext4: use IS_ENCRYPTED() to check encryption status f2fs: use IS_ENCRYPTED() to check encryption status fscrypt: remove filesystem specific

[f2fs-dev] [PATCH V5 9/9] fsverity: Move verity status check to fsverity_prepare_setattr

2018-12-12 Thread Chandan Rajendra
Instead of conditionally checking for verity status of an inode before invoking fsverity_prepare_setattr(), this commit moves the check inside the definition of fsverity_prepare_setattr(). Signed-off-by: Chandan Rajendra (EB: fix the !CONFIG_FS_VERITY case and inline the IS_VERITY() check

[f2fs-dev] [PATCH V5 5/9] ext4: use IS_VERITY() to check inode's fsverity status

2018-12-12 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_verity_inode() and makes use of the generic IS_ENCRYPTED() macro or ext4_test_inode_flag() to check for the encryption status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/ext4/ext4.h | 9 - fs/ext4/file.c

[f2fs-dev] [PATCH V5 3/9] fscrypt: remove filesystem specific build config option

2018-12-12 Thread Chandan Rajendra
ffects all the filesystems making use of fscrypt. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fscrypt.rst | 4 +- arch/mips/configs/generic_defconfig | 2 +- arch/nds32/configs/defconfig| 2 +- arch/s390/configs/debug_defconfig

[f2fs-dev] [PATCH V5 2/9] f2fs: use IS_ENCRYPTED() to check encryption status

2018-12-12 Thread Chandan Rajendra
This commit removes the f2fs specific f2fs_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Acked-by: Chao Yu Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c | 10

[f2fs-dev] [PATCH V5 6/9] f2fs: use IS_VERITY() to check inode's fsverity status

2018-12-12 Thread Chandan Rajendra
This commit removes the f2fs specific f2fs_verity_file() and makes use of the generic IS_VERITY() macro or file_is_verity() to check for the verity status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/f2fs/f2fs.h | 7 +-- fs/f2fs/file.c | 6 +++--- fs/f2fs

[f2fs-dev] [PATCH V5 4/9] Add S_VERITY and IS_VERITY()

2018-12-12 Thread Chandan Rajendra
Similar to S_ENCRYPTED/IS_ENCRYPTED(), this commit adds S_VERITY/IS_VERITY() to be able to check if a VFS inode has verity information associated with it. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[f2fs-dev] [PATCH V5 1/9] ext4: use IS_ENCRYPTED() to check encryption status

2018-12-12 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/ext4/dir.c | 8 fs/ext4/ext4.h| 5 - fs

Re: [f2fs-dev] [BUG BISECT next] Files cannot be opened after "fsverity: Move verity status check to fsverity_file_open"

2018-12-11 Thread Chandan Rajendra
On Tuesday, December 11, 2018 11:11:17 PM IST Eric Biggers wrote: > On Tue, Dec 11, 2018 at 03:15:53PM +0100, Krzysztof Kozlowski wrote: > > Hi, > > > > Bisect from today's next pointed me to: > > commit 4de97efb578a094e8fbf279522d41eb9ece1e3e0 > > Author: Chanda

[f2fs-dev] [PATCH V4 1/9] ext4: use IS_ENCRYPTED() to check encryption status

2018-12-11 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/ext4/dir.c | 8 fs/ext4/ext4.h| 5 - fs

[f2fs-dev] [PATCH V4 0/9] Remove fs specific fscrypt and fsverity build config options

2018-12-11 Thread Chandan Rajendra
encryption build option and make use of the generic CONFIG_FS_ENCRYPTION flag. RFC -> V1: 1. Add a new patch to implement S_VERITY/IS_VERITY(). 2. Split code that replaces filesystem specific routines with generic IS_ENCRYPTED() and IS_VERITY() calls into separate patches. Chandan Rajendra

[f2fs-dev] [PATCH V4 9/9] fsverity: Move verity status check to fsverity_prepare_setattr

2018-12-11 Thread Chandan Rajendra
Instead of conditionally checking for verity status of an inode before invoking fsverity_prepare_setattr(), this commit moves the check inside the definition of fsverity_prepare_setattr(). Signed-off-by: Chandan Rajendra --- fs/ext4/inode.c | 8 +++- fs/f2fs/file.c | 8

[f2fs-dev] [PATCH V4 3/9] fscrypt: remove filesystem specific build config option

2018-12-11 Thread Chandan Rajendra
ffects all the filesystems making use of fscrypt. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fscrypt.rst | 4 +- arch/mips/configs/generic_defconfig | 2 +- arch/nds32/configs/defconfig| 2 +- arch/s390/configs/debug_defconfig

[f2fs-dev] [PATCH V4 6/9] f2fs: use IS_VERITY() to check inode's fsverity status

2018-12-11 Thread Chandan Rajendra
This commit removes the f2fs specific f2fs_verity_file() and makes use of the generic IS_VERITY() macro or file_is_verity() to check for the verity status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/f2fs/f2fs.h | 7 +-- fs/f2fs/file.c | 6 +++--- fs/f2fs

[f2fs-dev] [PATCH V4 8/9] fsverity: Move verity status check to fsverity_file_open

2018-12-11 Thread Chandan Rajendra
Instead of conditionally checking for verity status of an inode before invoking fsverity_file_open(), this commit moves the check inside the definition of fsverity_file_open(). Signed-off-by: Chandan Rajendra --- fs/ext4/file.c | 8 +++- fs/f2fs/file.c | 8 +++- fs

[f2fs-dev] [PATCH V4 5/9] ext4: use IS_VERITY() to check inode's fsverity status

2018-12-11 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_verity_inode() and makes use of the generic IS_ENCRYPTED() macro or ext4_test_inode_flag() to check for the encryption status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/ext4/ext4.h | 9 - fs/ext4/file.c

[f2fs-dev] [PATCH V4 7/9] fsverity: Remove filesystem specific build config option

2018-12-11 Thread Chandan Rajendra
ffects all the filesystems making use of fsverity. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fsverity.rst | 4 ++-- fs/ext4/Kconfig| 20 fs/ext4/ext4.h | 2 -- fs/ext4/

[f2fs-dev] [PATCH V4 2/9] f2fs: use IS_ENCRYPTED() to check encryption status

2018-12-11 Thread Chandan Rajendra
This commit removes the f2fs specific f2fs_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Acked-by: Chao Yu Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c | 10

[f2fs-dev] [PATCH V4 4/9] Add S_VERITY and IS_VERITY()

2018-12-11 Thread Chandan Rajendra
Similar to S_ENCRYPTED/IS_ENCRYPTED(), this commit adds S_VERITY/IS_VERITY() to be able to check if a VFS inode has verity information associated with it. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [f2fs-dev] [PATCH V2 3/7] fscrypt: remove filesystem specific build config option

2018-12-11 Thread Chandan Rajendra
On Wednesday, December 12, 2018 8:18:12 AM IST Eric Biggers wrote: > On Tue, Dec 11, 2018 at 05:52:11PM -0800, Guenter Roeck wrote: > > Hi, > > > > On Tue, Dec 04, 2018 at 03:26:46PM +0530, Chandan Rajendra wrote: > > > In order to have a common code base for

[f2fs-dev] [PATCH V2 0/7] Remove fs specific fscrypt and fsverity build config options

2018-12-04 Thread Chandan Rajendra
ERITY flag. 2. Remove UBIFS specific encryption build option and make use of the generic CONFIG_FS_ENCRYPTION flag. RFC -> V1: 1. Add a new patch to implement S_VERITY/IS_VERITY(). 2. Split code that replaces filesystem specific routines with generic IS_ENCRYPTED() and IS_VERITY() calls into se

[f2fs-dev] [PATCH V2 6/7] f2fs: use IS_VERITY() to check inode's fsverity status

2018-12-04 Thread Chandan Rajendra
This commit now uses IS_VERITY() macro to check if fsverity is enabled on an inode. Acked-by: Chao Yu Signed-off-by: Chandan Rajendra --- fs/f2fs/file.c | 6 +++--- fs/f2fs/inode.c | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index

[f2fs-dev] [PATCH V2 2/7] f2fs: use IS_ENCRYPTED() to check encryption status

2018-12-04 Thread Chandan Rajendra
This commit removes the f2fs specific f2fs_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Acked-by: Chao Yu Signed-off-by: Chandan Rajendra --- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c | 10 +- fs/f2fs/file.c | 10

[f2fs-dev] [PATCH V2 7/7] fsverity: Remove filesystem specific build config option

2018-12-04 Thread Chandan Rajendra
ffects all the filesystems making use of fsverity. Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fsverity.rst | 4 ++-- fs/ext4/Kconfig| 20 fs/ext4/ext4.h | 2 -- fs/ext4/readpage.c | 4 ++-- fs/ex

[f2fs-dev] [PATCH V2 4/7] Add S_VERITY and IS_VERITY()

2018-12-04 Thread Chandan Rajendra
Similar to S_ENCRYPTED/IS_ENCRYPTED(), this commit adds S_VERITY/IS_VERITY() to be able to check if a VFS inode has verity information associated with it. Signed-off-by: Chandan Rajendra --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/fs.h b/include

[f2fs-dev] [PATCH V2 5/7] ext4: use IS_VERITY() to check inode's fsverity status

2018-12-04 Thread Chandan Rajendra
This commit now uses IS_VERITY() macro to check if fsverity is enabled on an inode. Signed-off-by: Chandan Rajendra --- fs/ext4/ext4.h | 9 - fs/ext4/file.c | 2 +- fs/ext4/inode.c| 10 ++ fs/ext4/readpage.c | 2 +- fs/ext4/super.c| 1 + 5 files changed, 9

[f2fs-dev] [PATCH V2 1/7] ext4: use IS_ENCRYPTED() to check encryption status

2018-12-04 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Signed-off-by: Chandan Rajendra --- fs/ext4/dir.c | 8 fs/ext4/ext4.h| 5 - fs/ext4/ext4_jbd2.h | 2

[f2fs-dev] [PATCH V2 3/7] fscrypt: remove filesystem specific build config option

2018-12-04 Thread Chandan Rajendra
ffects all the filesystems making use of fscrypt. Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fscrypt.rst | 4 +- arch/mips/configs/generic_defconfig | 2 +- arch/nds32/configs/defconfig| 2 +- arch/s390/configs/debug_defconfig | 2 +- arch/s3

[f2fs-dev] [PATCH V3 9/9] fsverity: Move verity status check to fsverity_prepare_setattr

2018-12-07 Thread Chandan Rajendra
Instead of conditionally checking for verity status of an inode before invoking fsverity_prepare_setattr(), this commit moves the check inside the definition of fsverity_prepare_setattr(). Signed-off-by: Chandan Rajendra --- fs/ext4/inode.c | 8 +++- fs/f2fs/file.c| 8 +++- fs

[f2fs-dev] [PATCH V3 5/9] ext4: use IS_VERITY() to check inode's fsverity status

2018-12-07 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_verity_inode() and makes use of the generic IS_ENCRYPTED() macro or ext4_test_inode_flag() to check for the encryption status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/ext4/ext4.h | 9 - fs/ext4/file.c

[f2fs-dev] [PATCH V3 7/9] fsverity: Remove filesystem specific build config option

2018-12-07 Thread Chandan Rajendra
ffects all the filesystems making use of fsverity. Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fsverity.rst | 4 ++-- fs/ext4/Kconfig| 20 fs/ext4/ext4.h | 2 -- fs/ext4/readpage.c | 4 ++-- fs/ex

[f2fs-dev] [PATCH V3 3/9] fscrypt: remove filesystem specific build config option

2018-12-07 Thread Chandan Rajendra
ffects all the filesystems making use of fscrypt. Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fscrypt.rst | 4 +- arch/mips/configs/generic_defconfig | 2 +- arch/nds32/configs/defconfig| 2 +- arch/s390/configs/debug_defconfig | 2 +- arch/s3

[f2fs-dev] [PATCH V3 1/9] ext4: use IS_ENCRYPTED() to check encryption status

2018-12-07 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/ext4/dir.c | 8 fs/ext4/ext4.h| 5 - fs

[f2fs-dev] [PATCH V3 2/9] f2fs: use IS_ENCRYPTED() to check encryption status

2018-12-07 Thread Chandan Rajendra
This commit removes the f2fs specific f2fs_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Acked-by: Chao Yu Signed-off-by: Chandan Rajendra --- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c | 10 +- fs/f2fs/f2fs.h | 7

[f2fs-dev] [PATCH V3 8/9] fsverity: Move verity status check to fsverity_file_open

2018-12-07 Thread Chandan Rajendra
Instead of conditionally checking for verity status of an inode before invoking fsverity_file_open(), this commit moves the check inside the definition of fsverity_file_open(). Signed-off-by: Chandan Rajendra --- fs/ext4/file.c| 8 +++- fs/f2fs/file.c| 8 +++- fs/verity/setup.c

[f2fs-dev] [PATCH V3 6/9] f2fs: use IS_VERITY() to check inode's fsverity status

2018-12-07 Thread Chandan Rajendra
This commit removes the f2fs specific f2fs_verity_file() and makes use of the generic IS_VERITY() macro or file_is_verity() to check for the verity status of an inode. Signed-off-by: Chandan Rajendra --- fs/f2fs/f2fs.h | 7 +-- fs/f2fs/file.c | 6 +++--- fs/f2fs/inode.c | 4 +++- fs/f2fs

[f2fs-dev] [PATCH V3 4/9] Add S_VERITY and IS_VERITY()

2018-12-07 Thread Chandan Rajendra
Similar to S_ENCRYPTED/IS_ENCRYPTED(), this commit adds S_VERITY/IS_VERITY() to be able to check if a VFS inode has verity information associated with it. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[f2fs-dev] [PATCH V3 0/9] Remove fs specific fscrypt and fsverity build config options

2018-12-07 Thread Chandan Rajendra
option and make use of the generic CONFIG_FS_ENCRYPTION flag. RFC -> V1: 1. Add a new patch to implement S_VERITY/IS_VERITY(). 2. Split code that replaces filesystem specific routines with generic IS_ENCRYPTED() and IS_VERITY() calls into separate patches. Chandan Rajendra (9): ext4: use IS_ENCRYPTED() t

Re: [f2fs-dev] [PATCH V2 3/7] fscrypt: remove filesystem specific build config option

2018-12-07 Thread Chandan Rajendra
On Wednesday, December 5, 2018 5:13:21 AM IST Eric Biggers wrote: > Hi Chandan, > > On Tue, Dec 04, 2018 at 03:26:46PM +0530, Chandan Rajendra wrote: > > In order to have a common code base for fscrypt "post read" processing > > for all filesystems which support

Re: [f2fs-dev] [PATCH 2/7] f2fs: use IS_ENCRYPTED() to check encryption status

2018-11-29 Thread Chandan Rajendra
On Friday, November 30, 2018 12:35:13 AM IST Eric Biggers wrote: > Hi Chandan, > > On Thu, Nov 29, 2018 at 04:08:31PM +0530, Chandan Rajendra wrote: > > On Monday, November 26, 2018 11:04:35 PM IST Theodore Y. Ts'o wrote: > > > On Sun, Nov 25, 2018 at 11:00:38PM -0500

Re: [f2fs-dev] [PATCH 2/7] f2fs: use IS_ENCRYPTED() to check encryption status

2018-11-29 Thread Chandan Rajendra
On Monday, November 26, 2018 11:04:35 PM IST Theodore Y. Ts'o wrote: > On Sun, Nov 25, 2018 at 11:00:38PM -0500, Theodore Y. Ts'o wrote: > > > > It might be that the simplest way to solve things is to merge the f2fs > > dev branch up to 79c66e75720c. This will have the net effect of > >

[f2fs-dev] [PATCH 2/7] f2fs: use IS_ENCRYPTED() to check encryption status

2018-11-18 Thread Chandan Rajendra
This commit removes the f2fs specific f2fs_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Signed-off-by: Chandan Rajendra --- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c | 10 +- fs/f2fs/file.c | 10 +- fs/f2fs

[f2fs-dev] [PATCH 3/7] fscrypt: Remove filesystem specific build config option

2018-11-18 Thread Chandan Rajendra
ffects all the filesystems making use of fscrypt. Signed-off-by: Chandan Rajendra --- fs/crypto/Kconfig | 2 +- fs/ext4/Kconfig | 15 -- fs/ext4/dir.c | 2 - fs/ext4/ext4.h | 7 +- fs/ext4/inode.c | 8 +

[f2fs-dev] [PATCH 1/7] ext4: use IS_ENCRYPTED() to check encryption status

2018-11-18 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Signed-off-by: Chandan Rajendra --- fs/ext4/dir.c | 8 fs/ext4/ext4.h| 5 - fs/ext4/ext4_jbd2.h | 2

[f2fs-dev] [PATCH 0/7] Remove fs specific fscrypt and fsverity build config options

2018-11-18 Thread Chandan Rajendra
ment S_VERITY/IS_VERITY(). 2. Split code that replaces filesystem specific routines with generic IS_ENCRYPTED() and IS_VERITY() calls into separate patches. Chandan Rajendra (7): ext4: use IS_ENCRYPTED() to check encryption status f2fs: use IS_ENCRYPTED() to check encryption status fs

[f2fs-dev] [PATCH 6/7] f2fs: use IS_VERITY() to check inode's fsverity status

2018-11-18 Thread Chandan Rajendra
This commit now uses IS_VERITY() macro to check if fsverity is enabled on an inode. Signed-off-by: Chandan Rajendra --- fs/f2fs/file.c | 6 +++--- fs/f2fs/inode.c | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 6c7ad15000b9

[f2fs-dev] [PATCH 4/7] Add S_VERITY and IS_VERITY()

2018-11-18 Thread Chandan Rajendra
Similar to S_ENCRYPTED/IS_ENCRYPTED(), this commit adds S_VERITY/IS_VERITY() to be able to check if a VFS inode has verity information associated with it. Signed-off-by: Chandan Rajendra --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/fs.h b/include

[f2fs-dev] [PATCH 7/7] fsverity: Remove filesystem specific build config option

2018-11-18 Thread Chandan Rajendra
ffects all the filesystems making use of fsverity. Signed-off-by: Chandan Rajendra --- fs/ext4/Kconfig | 20 fs/ext4/ext4.h | 2 -- fs/ext4/readpage.c | 4 ++-- fs/ext4/super.c | 6 +++--- fs/ext4/sysfs.c | 4 ++-- fs/f2

[f2fs-dev] [PATCH 5/7] ext4: use IS_VERITY() to check inode's fsverity status

2018-11-18 Thread Chandan Rajendra
This commit now uses IS_VERITY() macro to check if fsverity is enabled on an inode. Signed-off-by: Chandan Rajendra --- fs/ext4/ext4.h | 9 - fs/ext4/file.c | 2 +- fs/ext4/inode.c| 10 ++ fs/ext4/readpage.c | 2 +- 4 files changed, 8 insertions(+), 15 deletions

Re: [f2fs-dev] [PATCH 5/7] ext4: use IS_VERITY() to check inode's fsverity status

2018-11-26 Thread Chandan Rajendra
On Monday, November 26, 2018 11:06:15 PM IST Theodore Y. Ts'o wrote: > On Mon, Nov 19, 2018 at 10:53:22AM +0530, Chandan Rajendra wrote: > > This commit now uses IS_VERITY() macro to check if fsverity is > > enabled on an inode. > > > > Signed-off-by: Chandan Rajen

Re: [f2fs-dev] [PATCH 3/7] fscrypt: Remove filesystem specific build config option

2018-11-27 Thread Chandan Rajendra
On Tuesday, November 27, 2018 5:44:24 AM IST Eric Biggers wrote: > Hi Chandan, > > On Mon, Nov 19, 2018 at 10:53:20AM +0530, Chandan Rajendra wrote: > > In order to have a common code base for fscrypt "post read" processing > > for all filesystems which support

Re: [f2fs-dev] [PATCH 7/7] fsverity: Remove filesystem specific build config option

2018-11-27 Thread Chandan Rajendra
On Tuesday, November 27, 2018 6:15:30 AM IST Eric Biggers wrote: > Hi Chandan, > > On Mon, Nov 19, 2018 at 10:53:24AM +0530, Chandan Rajendra wrote: > > In order to have a common code base for fsverity "post read" processing > > for all filesystems which suppo

Re: [f2fs-dev] [PATCH 4/7] Add S_VERITY and IS_VERITY()

2018-11-27 Thread Chandan Rajendra
On Tuesday, November 27, 2018 5:38:38 AM IST Eric Biggers wrote: > Hi Chandan, > > On Mon, Nov 19, 2018 at 10:53:21AM +0530, Chandan Rajendra wrote: > > Similar to S_ENCRYPTED/IS_ENCRYPTED(), this commit adds > > S_VERITY/IS_VERITY() to be able to check if a VFS inode has v

Re: [f2fs-dev] [PATCH 5/7] ext4: use IS_VERITY() to check inode's fsverity status

2018-11-28 Thread Chandan Rajendra
On Monday, November 26, 2018 11:06:15 PM IST Theodore Y. Ts'o wrote: > On Mon, Nov 19, 2018 at 10:53:22AM +0530, Chandan Rajendra wrote: > > This commit now uses IS_VERITY() macro to check if fsverity is > > enabled on an inode. > > > > Signed-off-by: Chandan Rajen

Re: [f2fs-dev] [RFC PATCH 05/10] fsverity: Add call back to decide if verity check has to be performed

2019-02-21 Thread Chandan Rajendra
On Wednesday, February 20, 2019 4:56:49 AM IST Eric Biggers wrote: > Hi Chandan, > > On Mon, Feb 18, 2019 at 03:34:28PM +0530, Chandan Rajendra wrote: > > Ext4 and F2FS store verity metadata in data extents (beyond > > inode->i_size) associated with a file. But other file

Re: [f2fs-dev] [RFC PATCH 04/10] Consolidate "post read processing" into a new file

2019-02-21 Thread Chandan Rajendra
On Wednesday, February 20, 2019 4:52:44 AM IST Eric Biggers wrote: > Hi Chandan, > > On Mon, Feb 18, 2019 at 03:34:27PM +0530, Chandan Rajendra wrote: > > The post read processing code is used by both Ext4 and F2FS. Hence to > > remove duplicity, this commit moves the code i

Re: [f2fs-dev] [RFC PATCH 08/10] fsverity: Add call back to verify file holes

2019-02-21 Thread Chandan Rajendra
On Wednesday, February 20, 2019 6:05:07 AM IST Eric Biggers wrote: > On Mon, Feb 18, 2019 at 03:34:31PM +0530, Chandan Rajendra wrote: > > readpage() implmentations zero out part of the page-cache page mapping a > > file hole. This commit adds a call back to "struct fsverity_o

Re: [f2fs-dev] [RFC PATCH 06/10] Introduce REQ_POST_READ_PROC bio flag

2019-02-21 Thread Chandan Rajendra
On Wednesday, February 20, 2019 5:51:00 AM IST Eric Biggers wrote: > Hi Chandan, > > On Mon, Feb 18, 2019 at 03:34:29PM +0530, Chandan Rajendra wrote: > > Ext4 and F2FS currently use a non-NULL value stored at bio->bi_private > > to determine if the contents of the bio ne

Re: [f2fs-dev] [RFC PATCH 00/10] Consolidate Post read processing code

2019-02-21 Thread Chandan Rajendra
On Wednesday, February 20, 2019 6:11:07 AM IST Eric Biggers wrote: > On Mon, Feb 18, 2019 at 03:34:23PM +0530, Chandan Rajendra wrote: > > Based on the reviews provided for this patchset, I > > will change F2FS to use mpage_readpage[s] and post the next version of > > t

Re: [f2fs-dev] [RFC PATCH 00/10] Consolidate Post read processing code

2019-02-21 Thread Chandan Rajendra
On Wednesday, February 20, 2019 2:47:16 AM IST Eric Biggers wrote: > Hi Chandan, > > On Mon, Feb 18, 2019 at 03:34:23PM +0530, Chandan Rajendra wrote: > > This patchset moves the "post read processing" code into a file of its > > own and gets the generic

Re: [f2fs-dev] [RFC PATCH 00/10] Consolidate Post read processing code

2019-02-21 Thread Chandan Rajendra
On Friday, February 22, 2019 12:08:28 AM IST Eric Biggers wrote: > On Thu, Feb 21, 2019 at 07:02:03PM +0530, Chandan Rajendra wrote: > > On Wednesday, February 20, 2019 6:11:07 AM IST Eric Biggers wrote: > > > On Mon, Feb 18, 2019 at 03:34:23PM +0530, Chandan Rajendra wr

[f2fs-dev] [RFC PATCH 01/10] ext4: use IS_ENCRYPTED() to check encryption status

2019-02-18 Thread Chandan Rajendra
This commit removes the ext4 specific ext4_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/ext4/dir.c | 8 fs/ext4/ext4.h| 5 - fs

Re: [f2fs-dev] [RFC PATCH 00/10] Consolidate Post read processing code

2019-02-18 Thread Chandan Rajendra
On Monday, February 18, 2019 3:34:23 PM IST Chandan Rajendra wrote: > This patchset moves the "post read processing" code into a file of its > own and gets the generic do_mpage_readpge() to make use of the > functionality provided. With these changes in place, the patchset &g

[f2fs-dev] [RFC PATCH 09/10] fs/mpage.c: Integrate post read processing

2019-02-18 Thread Chandan Rajendra
load needs to be processed further before handing over the data to user space. The context structure is used for tracking the state machine associated with post read processing. Signed-off-by: Chandan Rajendra --- fs/mpage.c | 77 +- 1 file c

[f2fs-dev] [RFC PATCH 10/10] ext4: Wire up ext4_readpage[s] to use mpage_readpage[s]

2019-02-18 Thread Chandan Rajendra
Now that do_mpage_readpage() is "post read process" aware, this commit gets ext4_readpage[s] to use mpage_readpage[s] and deletes ext4's readpage.c since the associated functionality is not required anymore. Signed-off-by: Chandan Rajendra --- fs/ext4/Makefile | 2 +- fs/ex

[f2fs-dev] [RFC PATCH 03/10] fscrypt: remove filesystem specific build config option

2019-02-18 Thread Chandan Rajendra
From: Chandan Rajendra In order to have a common code base for fscrypt "post read" processing for all filesystems which support encryption, this commit removes filesystem specific build config option (e.g. CONFIG_EXT4_FS_ENCRYPTION) and replaces it with a build option (i.e. CONFIG_FS_

[f2fs-dev] [RFC PATCH 08/10] fsverity: Add call back to verify file holes

2019-02-18 Thread Chandan Rajendra
readpage() implmentations zero out part of the page-cache page mapping a file hole. This commit adds a call back to "struct fsverity_operations" which readpage() can invoke to verify the file hole. Signed-off-by: Chandan Rajendra --- fs/ext4/super.c | 1 + include/linux/fsve

[f2fs-dev] [RFC PATCH 04/10] Consolidate "post read processing" into a new file

2019-02-18 Thread Chandan Rajendra
ty sources. With these in place, the post processing code now has to just invoke enqueue functions provided by fscrypt and fsverity. Signed-off-by: Chandan Rajendra --- fs/Makefile | 3 +- fs/crypto/bio.c | 21 ++-- fs/crypto/crypto.c| 1 +

[f2fs-dev] [RFC PATCH 05/10] fsverity: Add call back to decide if verity check has to be performed

2019-02-18 Thread Chandan Rajendra
ity operation needs to performed against a page-cache page holding file data. Signed-off-by: Chandan Rajendra --- fs/ext4/super.c | 9 + fs/post_read_process.c | 5 +++-- include/linux/fsverity.h | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/fs/ext4/super.c b

[f2fs-dev] [RFC PATCH 06/10] Introduce REQ_POST_READ_PROC bio flag

2019-02-18 Thread Chandan Rajendra
buffer_head. Hence, this commit adds the new flag REQ_POST_READ_PROC to be able to decisively check for post process requirement for a bio. Signed-off-by: Chandan Rajendra --- fs/ext4/readpage.c| 11 +-- fs/post_read_process.c| 2 +- include/linux/blk_types.h | 2 ++

[f2fs-dev] [RFC PATCH 07/10] fsverity: Add call back to determine readpage limit

2019-02-18 Thread Chandan Rajendra
() to read files having verity metadata appended beyond i_size. Signed-off-by: Chandan Rajendra --- fs/ext4/super.c | 18 ++ include/linux/fsverity.h | 1 + 2 files changed, 19 insertions(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 2d7781ab6824..4493ddc35

[f2fs-dev] [RFC PATCH 00/10] Consolidate Post read processing code

2019-02-18 Thread Chandan Rajendra
e. patches to replace per-filesystem encryption config options with a single config option that affects all filesystems making use of fscrypt code. Chandan Rajendra (10): ext4: use IS_ENCRYPTED() to check encryption status f2fs: use IS_ENCRYPTED() to check encryption status fscrypt: remove filesyste

[f2fs-dev] [RFC PATCH 02/10] f2fs: use IS_ENCRYPTED() to check encryption status

2019-02-18 Thread Chandan Rajendra
From: Chandan Rajendra This commit removes the f2fs specific f2fs_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Acked-by: Chao Yu Reviewed-by: Eric Biggers Signed-off-by: Chandan Rajendra --- fs/f2fs/data.c | 4 ++-- fs

[f2fs-dev] [RFC PATCH 13/14] fscrypt_zeroout_range: Encrypt all zeroed out blocks of a page

2019-04-12 Thread Chandan Rajendra
For subpage-sized blocks, this commit adds code to encrypt all zeroed out blocks mapped by a page. Signed-off-by: Chandan Rajendra --- fs/crypto/bio.c | 40 ++-- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c

[f2fs-dev] [RFC PATCH 12/14] ext4: Compute logical block and the page range to be encrypted

2019-04-12 Thread Chandan Rajendra
For subpage-sized blocks, the initial logical block number mapped by a page can be different from page->index. Hence this commit adds code to compute the first logical block mapped by the page and also the page range to be encrypted. Signed-off-by: Chandan Rajendra --- fs/ext4/page-io.c

[f2fs-dev] [RFC PATCH 07/14] Remove the term "bio" from post read processing

2019-04-12 Thread Chandan Rajendra
For block size < page size, apart from handling bios, post read processing needs to handle buffer heads. Hence this commit removes the term "bio" from the identifiers associated with post read processing. Signed-off-by: Chandan Rajendra --- fs/crypto/bio.c | 6

[f2fs-dev] [RFC PATCH 08/14] Add decryption support for sub-pagesized blocks

2019-04-12 Thread Chandan Rajendra
ecrypting each block in turn. Signed-off-by: Chandan Rajendra --- fs/buffer.c | 82 +++ fs/crypto/bio.c | 48 -- fs/crypto/crypto.c| 19 ++- fs/f2fs/data.c

[f2fs-dev] [RFC PATCH 03/14] fsverity: Add call back to decide if verity check has to be performed

2019-04-12 Thread Chandan Rajendra
ity operation needs to performed against a page-cache page holding file data. Signed-off-by: Chandan Rajendra --- fs/ext4/super.c | 6 ++ fs/post_read_process.c | 4 +++- include/linux/fsverity.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ext4/super.c b/fs/e

[f2fs-dev] [RFC PATCH 04/14] fsverity: Add call back to determine readpage limit

2019-04-12 Thread Chandan Rajendra
() to read files having verity metadata appended beyond i_size. Signed-off-by: Chandan Rajendra --- fs/ext4/super.c | 18 ++ include/linux/fsverity.h | 1 + 2 files changed, 19 insertions(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 63d73b360f1d..cadf50f95

[f2fs-dev] [RFC PATCH 09/14] ext4: Decrypt all boundary blocks when doing buffered write

2019-04-12 Thread Chandan Rajendra
With subpage sized blocks, ext4_block_write_begin() can have up to two blocks to decrypt. Hence this commit invokes fscrypt_decrypt_page() for each of those blocks. Signed-off-by: Chandan Rajendra --- fs/ext4/inode.c | 33 +++-- 1 file changed, 23 insertions(+), 10

[f2fs-dev] [RFC PATCH 05/14] fs/mpage.c: Integrate post read processing

2019-04-12 Thread Chandan Rajendra
rivate indicates that after the read operation is performed, the bio's payload needs to be processed further before handing over the data to user space. The context structure is used for tracking the state machine associated with post read processing. Signed-off-by: Chandan Rajendra ---

[f2fs-dev] [RFC PATCH 11/14] fscrypt_encrypt_page: Loop across all blocks mapped by a page range

2019-04-12 Thread Chandan Rajendra
For subpage-sized blocks, this commit now encrypts all blocks mapped by a page range. Signed-off-by: Chandan Rajendra --- fs/crypto/crypto.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c index

[f2fs-dev] [RFC PATCH 14/14] ext4: Enable encryption for subpage-sized blocks

2019-04-12 Thread Chandan Rajendra
less than page size now works. Signed-off-by: Chandan Rajendra --- Documentation/filesystems/fscrypt.rst | 4 ++-- fs/ext4/super.c | 7 --- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems

[f2fs-dev] [RFC PATCH 10/14] ext4: Decrypt the block that needs to be partially zeroed

2019-04-12 Thread Chandan Rajendra
__ext4_block_zero_page_range decrypts the entire page. This commit decrypts the block to be partially zeroed instead of the whole page. Signed-off-by: Chandan Rajendra --- fs/ext4/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c

[f2fs-dev] [RFC PATCH 01/14] ext4: Clear BH_Uptodate flag on decryption error

2019-04-12 Thread Chandan Rajendra
On an error return from fscrypt_decrypt_page(), ext4_block_write_begin() can return with the page's buffer_head marked with BH_Uptodate flag. This commit clears the BH_Uptodate flag in such cases. Signed-off-by: Chandan Rajendra --- fs/ext4/inode.c | 8 ++-- 1 file changed, 6 insertions

[f2fs-dev] [RFC PATCH 00/14] Consolidate Post read processing code

2019-04-12 Thread Chandan Rajendra
eeds to be tested. UBIFS seems to be the only user of this piece of code. 2. Verity changes needs to be added for F2FS and I will add them in the next patchset based on the review comments obtained for the current patchset. Chandan Rajendra (14): ext4: Clear BH_Uptodate flag on decryption

[f2fs-dev] [RFC PATCH 02/14] Consolidate "post read processing" into a new file

2019-04-12 Thread Chandan Rajendra
ty sources. With these in place, the post processing code now has to just invoke enqueue functions provided by fscrypt and fsverity. Signed-off-by: Chandan Rajendra --- fs/Makefile | 4 + fs/crypto/bio.c | 23 ++--- fs/crypto/crypto.c| 17 ++--

[f2fs-dev] [RFC PATCH V2 01/14] ext4: Clear BH_Uptodate flag on decryption error

2019-04-14 Thread Chandan Rajendra
On an error return from fscrypt_decrypt_page(), ext4_block_write_begin() can return with the page's buffer_head marked with BH_Uptodate flag. This commit clears the BH_Uptodate flag in such cases. Signed-off-by: Chandan Rajendra --- fs/ext4/inode.c | 8 ++-- 1 file changed, 6 insertions

[f2fs-dev] [RFC PATCH V2 04/14] fsverity: Add call back to determine readpage limit

2019-04-14 Thread Chandan Rajendra
() to read files having verity metadata appended beyond i_size. Signed-off-by: Chandan Rajendra --- fs/ext4/super.c | 18 ++ include/linux/fsverity.h | 1 + 2 files changed, 19 insertions(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 63d73b360f1d..cadf50f95

[f2fs-dev] [RFC PATCH V2 03/14] fsverity: Add call back to decide if verity check has to be performed

2019-04-14 Thread Chandan Rajendra
ity operation needs to performed against a page-cache page holding file data. Signed-off-by: Chandan Rajendra --- fs/ext4/super.c | 6 ++ fs/post_read_process.c | 4 +++- include/linux/fsverity.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ext4/super.c b/fs/e

[f2fs-dev] [RFC PATCH V2 05/14] fs/mpage.c: Integrate post read processing

2019-04-14 Thread Chandan Rajendra
rivate indicates that after the read operation is performed, the bio's payload needs to be processed further before handing over the data to user space. The context structure is used for tracking the state machine associated with post read processing. Signed-off-by: Chandan Rajendra ---

[f2fs-dev] [RFC PATCH V2 08/14] Add decryption support for sub-pagesized blocks

2019-04-14 Thread Chandan Rajendra
ecrypting each block in turn. Signed-off-by: Chandan Rajendra --- fs/buffer.c | 85 +++ fs/crypto/bio.c | 48 +++-- fs/crypto/crypto.c| 19 ++- fs/f2fs/data.c

[f2fs-dev] [RFC PATCH V2 13/14] fscrypt_zeroout_range: Encrypt all zeroed out blocks of a page

2019-04-14 Thread Chandan Rajendra
For subpage-sized blocks, this commit adds code to encrypt all zeroed out blocks mapped by a page. Signed-off-by: Chandan Rajendra --- fs/crypto/bio.c | 40 ++-- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c

[f2fs-dev] [RFC PATCH V2 11/14] fscrypt_encrypt_page: Loop across all blocks mapped by a page range

2019-04-14 Thread Chandan Rajendra
For subpage-sized blocks, this commit now encrypts all blocks mapped by a page range. Signed-off-by: Chandan Rajendra --- fs/crypto/crypto.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c index

  1   2   >