__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
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
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
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
To support decryption of sub-pagesized blocks this commit adds code to,
1. Track buffer head in "struct read_callbacks_ctx".
2. Pass buffer head argument to all read callbacks.
3. Add new fscrypt helper to decrypt the file data referred to by a
buffer head.
Signed-off-by: Chanda
This commit gets Ext4 and F2FS to make use of read callbacks API to
perform decryption of file data read from the disk.
---
fs/crypto/bio.c | 30 +
fs/crypto/crypto.c | 1 +
fs/crypto/fscrypt_private.h | 3 +
fs/ext4/readpage.c | 29 +++--
by the endio
function associated with the read operation.
Signed-off-by: Chandan Rajendra
---
fs/Kconfig | 3 +
fs/Makefile| 2 +
fs/crypto/Kconfig | 1 +
fs/crypto/bio.c| 11 +++
fs/read_callbacks.c| 174
underlying disk.
Signed-off-by: Chandan Rajendra
---
fs/mpage.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/fs/mpage.c b/fs/mpage.c
index 436a85260394..611ad122fc92 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -30,6 +30,7 @@
#include
#include
#include
t_page()
code by executing fstests on UBIFS.
2. Implement F2fs function call back to check if the contents of a
page holding a verity file's data needs to be verified.
RFC V1 -> RFC V2:
1. Describe the purpose of "Post processing code" in the cover letter.
2. Fix build errors when CON
es the structure and the
associated code.
Signed-off-by: Chandan Rajendra
---
fs/crypto/crypto.c | 89 +
include/linux/fscrypt.h | 25
2 files changed, 2 insertions(+), 112 deletions(-)
diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
On Saturday, June 22, 2019 3:45:51 AM IST Eric Biggers wrote:
> On Sun, Jun 16, 2019 at 09:38:06PM +0530, Chandan Rajendra wrote:
> > This patchset moves the "FS read I/O callbacks" code into a file of its
> > own (i.e. fs/read_callbacks.c) and modifies the generic
>
On Saturday, June 22, 2019 2:38:01 AM IST Eric Biggers wrote:
> Hi Chandan,
>
> On Sun, Jun 16, 2019 at 09:38:08PM +0530, Chandan Rajendra wrote:
> > This commit gets Ext4 and F2FS to make use of read callbacks API to
> > perform decryption of file data read from the disk.
&
On Saturday, June 22, 2019 2:44:55 AM IST Eric Biggers wrote:
> On Sun, Jun 16, 2019 at 09:38:10PM +0530, Chandan Rajendra wrote:
> > This commit adds code to make do_mpage_readpage() to be "read callbacks"
> > aware i.e. for files requiring decryption, do_mpage_readpage()
On Saturday, June 22, 2019 2:59:17 AM IST Eric Biggers wrote:
> On Sun, Jun 16, 2019 at 09:38:12PM +0530, Chandan Rajendra wrote:
> > To support decryption of sub-pagesized blocks this commit adds code to,
> > 1. Track buffer head in "struct read_callbacks_ctx".
> &g
On Saturday, June 22, 2019 1:33:57 AM IST Eric Biggers wrote:
> Hi Chandan,
>
> On Sun, Jun 16, 2019 at 09:38:07PM +0530, Chandan Rajendra wrote:
> > Read callbacks implements a state machine to be executed after a
> > buffered read I/O is completed. They help in furthe
On Tuesday, April 30, 2019 10:21:15 PM IST Eric Biggers wrote:
> On Sun, Apr 28, 2019 at 10:01:20AM +0530, Chandan Rajendra wrote:
> > For subpage-sized blocks, this commit adds code to encrypt all zeroed
> > out blocks mapped by a page.
> >
> > Signed-off-by: Chanda
On Tuesday, April 30, 2019 7:07:28 AM IST Chao Yu wrote:
> On 2019/4/28 12:31, Chandan Rajendra wrote:
> > The "read callbacks" code is used by both Ext4 and F2FS. Hence to
> > remove duplicity, this commit moves the code into
> > include/linux/read_call
On Tuesday, April 30, 2019 5:30:28 AM IST Eric Biggers wrote:
> Hi Chandan,
>
> On Sun, Apr 28, 2019 at 10:01:10AM +0530, Chandan Rajendra wrote:
> > The "read callbacks" code is used by both Ext4 and F2FS. Hence to
> > remove duplicity, this commit moves
Hi Eric,
On Tuesday, April 30, 2019 6:08:18 AM IST Eric Biggers wrote:
> On Sun, Apr 28, 2019 at 10:01:15AM +0530, Chandan Rajendra wrote:
> > To support decryption of sub-pagesized blocks this commit adds code to,
> > 1. Track buffer head in "struct read_callbacks_ctx"
On Tuesday, April 30, 2019 11:35:08 PM IST Eric Biggers wrote:
> On Sun, Apr 28, 2019 at 10:01:10AM +0530, Chandan Rajendra wrote:
> > The "read callbacks" code is used by both Ext4 and F2FS. Hence to
> > remove duplicity, this commit moves the code into
> > includ
On Wednesday, May 1, 2019 2:40:38 AM IST Jeremy Sowden wrote:
> On 2019-04-28, at 10:01:11 +0530, Chandan Rajendra wrote:
> > Ext4 and F2FS store verity metadata in data extents (beyond
> > inode->i_size) associated with a file. But other filesystems might
> > choose al
On Tuesday, April 30, 2019 10:31:51 PM IST Eric Biggers wrote:
> On Sun, Apr 28, 2019 at 10:01:19AM +0530, Chandan Rajendra wrote:
> > For subpage-sized blocks, the initial logical block number mapped by a
> > page can be different from page->index. Hence this commit adds c
On Wednesday, May 1, 2019 4:38:41 AM IST Eric Biggers wrote:
> On Tue, Apr 30, 2019 at 10:11:35AM -0700, Eric Biggers wrote:
> > On Sun, Apr 28, 2019 at 10:01:18AM +0530, Chandan Rajendra wrote:
> > > For subpage-sized blocks, this commit now encrypts all blocks mapped by
On Thursday, May 2, 2019 3:59:01 AM IST Eric Biggers wrote:
> Hi Chandan,
>
> On Wed, May 01, 2019 at 08:19:35PM +0530, Chandan Rajendra wrote:
> > On Wednesday, May 1, 2019 4:38:41 AM IST Eric Biggers wrote:
> > > On Tue, Apr 30, 2019 at 10:11:35AM -0700, Eric Biggers wr
ument. It also makes it so
> that all callers have to provide inode and lblk_num, when fscrypt could
> determine these itself for pagecache pages.
>
> Therefore, move the FS_CFLG_OWN_PAGES behavior into a new function
> fscrypt_decrypt_block_inplace().
>
Looks good to m
n again this function
> already wasn't optimized for performance. As a future optimization, we
> could submit much larger bios here.
>
> This is in preparation for allowing encryption on ext4 filesystems with
> blocksize != PAGE_SIZE.
>
> This is based on work by Chand
n ext4 filesystems with
> blocksize != PAGE_SIZE.
>
> This is based on work by Chandan Rajendra.
>
Looks good to me,
Reviewed-by: Chandan Rajendra
--
chandan
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
with
> blocksize != PAGE_SIZE.
>
> This is based on work by Chandan Rajendra.
Looks good to me,
Reviewed-by: Chandan Rajendra
--
chandan
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
ument. It also makes it so
> that all callers have to provide inode and lblk_num, when fscrypt could
> determine these itself for pagecache pages.
>
> Therefore, move the FS_CFLG_OWN_PAGES behavior into a new function
> fscrypt_encrypt_block_inplace().
Looks good to me,
Reviewed-by:
with
> blocksize != PAGE_SIZE.
>
> This is based on work by Chandan Rajendra.
Looks good to me,
Reviewed-by: Chandan Rajendra
--
chandan
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
both encryption and
> decryption, not just encryption.
Looks good to me,
Reviewed-by: Chandan Rajendra
--
chandan
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
On Thursday, May 2, 2019 4:15:04 AM IST Eric Biggers wrote:
> From: Eric Biggers
>
> Now that fscrypt_ctx is not used for writes, remove the 'w' fields.
>
Looks good to me,
Reviewed-by: Chandan Rajendra
--
chandan
___
Linux-f2fs-d
refore, this patch makes this change. In the process, it also cleans
> up the API exposed to filesystems that allows testing whether a page is
> a bounce page, getting the pagecache page from a bounce page, and
> freeing a bounce page.
Looks good to me,
a "page" per se. To
> reflect this, rename it to fscrypt_crypt_block().
>
Looks good to me,
Reviewed-by: Chandan Rajendra
--
chandan
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
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
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
and fsverity sources. With these in place, the read
callbacks code now has to just invoke enqueue functions provided by
fscrypt and fsverity.
Signed-off-by: Chandan Rajendra
---
fs/Kconfig | 4 +
fs/Makefile| 4 +
fs/crypto/Kconfig | 1 +
fs/crypto/bio.c
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
()
to read files having verity metadata appended beyond i_size.
Signed-off-by: Chandan Rajendra
---
fs/ext4/super.c | 17 +
include/linux/fsverity.h | 1 +
2 files changed, 18 insertions(+)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 63d73b360f1d..8e483afba
ents of a
page holding a verity file's data needs to be verified.
RFC V1 -> RFC V2:
1. Describe the purpose of "Post processing code" in the cover letter.
2. Fix build errors when CONFIG_FS_VERITY is enabled.
Chandan Rajendra (13):
ext4: Clear BH_Uptodate flag on decryption error
Cons
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
---
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
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
n.
Signed-off-by: Chandan Rajendra
---
fs/buffer.c| 83 +-
fs/crypto/bio.c| 50 +---
fs/crypto/crypto.c | 19 +++-
fs/f2fs/data.c | 2 +-
fs/mpage.c |
ity operation needs to performed against a page-cache
page holding file data.
Signed-off-by: Chandan Rajendra
---
fs/ext4/super.c | 6 ++
fs/f2fs/super.c | 6 ++
fs/read_callbacks.c | 4 +++-
include/linux/fsverity.h | 1 +
4 files changed, 16 insertions(+), 1 delet
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
__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
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
On Wednesday, April 24, 2019 5:36:46 PM IST Jaegeuk Kim wrote:
> On 04/24, Chandan Rajendra wrote:
> > On Wednesday, April 24, 2019 2:01:26 PM IST Jaegeuk Kim wrote:
> > > Hi Chandan,
> > >
> > > On 04/24, Chandan Rajendra wrote:
> > > > The post re
On Wednesday, April 24, 2019 7:54:23 PM IST Christoph Hellwig wrote:
> On Wed, Apr 24, 2019 at 03:34:17PM +0530, Chandan Rajendra wrote:
> > To clarify, Are you suggesting that a new kconfig option (say
> > CONFIG_FS_READ_CALLBACKS) be provided to the user so that the follo
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
ity operation needs to performed against a page-cache
page holding file data.
Signed-off-by: Chandan Rajendra
---
fs/ext4/super.c | 6 ++
fs/f2fs/super.c | 6 ++
fs/post_read_process.c | 4 +++-
include/linux/fsverity.h | 1 +
4 files changed, 16 insertions(+), 1 delet
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
fstests on UBIFS.
2. Implement F2fs function call back to check if the contents of a
page holding a verity file's data needs to be verified.
RFC V1 -> RFC V2:
1. Describe the purpose of "Post processing code" in the cover letter.
2. Fix build errors when CONFIG_FS_VERITY is enabled.
Chan
ecrypting each block in turn.
Signed-off-by: Chandan Rajendra
---
fs/buffer.c | 83 +++
fs/crypto/bio.c | 50 +--
fs/crypto/crypto.c| 19 ++-
fs/f2fs/data.c
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
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
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
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
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
__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
On Wednesday, April 24, 2019 11:05:44 AM IST Christoph Hellwig wrote:
> On Wed, Apr 24, 2019 at 10:07:18AM +0530, Chandan Rajendra wrote:
> > +ifeq (y, $(firstword $(filter y,$(CONFIG_FS_ENCRYPTION)
> > $(CONFIG_FS_VERITY
> > +obj-y += post_read_process.o
> >
()
to read files having verity metadata appended beyond i_size.
Signed-off-by: Chandan Rajendra
---
fs/ext4/super.c | 17 +
include/linux/fsverity.h | 1 +
2 files changed, 18 insertions(+)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 63d73b360f1d..8e483afba
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 +--
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
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
---
FLG_OWN_PAGES subset of fscrypt_encrypt_page()
code by executing fstests on UBIFS.
2. Implement F2fs function call back to check if the contents of a
page holding a verity file's data needs to be verified.
RFC V1 -> RFC V2:
1. Describe the purpose of "Post processing code" in the cover le
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.
---
fs/ext4/Makefile | 2 +-
fs/ext4/inode.c| 5 +-
fs/ext4/readpage.c | 295
by the endio
function associated with the read operation.
Signed-off-by: Chandan Rajendra
---
fs/Kconfig | 3 +
fs/Makefile| 1 +
fs/ext4/Kconfig| 1 +
fs/f2fs/Kconfig| 1 +
fs/read_callbacks.c| 285
This commit sets up read_callbacks context for buffer heads whose
contents need to be decrypted on endio.
Signed-off-by: Chandan Rajendra
---
fs/buffer.c | 33 ++---
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index
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
underlying disk.
Signed-off-by: Chandan Rajendra
---
fs/mpage.c | 24 +---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/fs/mpage.c b/fs/mpage.c
index 3f19da75178b..65e7165644e2 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -30,6 +30,7 @@
#include
#include
F2FS has a copy of "post read processing" code using which encrypted
file data is decrypted. This commit replaces it to make use of the
generic read_callbacks facility.
Signed-off-by: Chandan Rajendra
---
fs/f2fs/data.c | 109
fs/f
tructure and the
associated code.
While at it, this commit also removes definitions of
__fscrypt_decrypt_bio() and fscrypt_decrypt_bio() since we have to now
use the APIs provided by read_callbacks facility.
Signed-off-by: Chandan Rajendra
---
fs/crypto/bio.c | 43
g generic/475 test case.
Hence this commit introduces a new buffer head flag to reliably check for
decryption of a buffer head's contents after the block has been read
from the disk.
Signed-off-by: Chandan Rajendra
---
include/linux/buffer_head.h | 2 ++
1 file changed, 2 insertions(+)
diff --g
On Friday, August 16, 2019 11:48 AM Chandan Rajendra wrote:
> F2FS has a copy of "post read processing" code using which encrypted
> file data is decrypted. This commit replaces it to make use of the
> generic read_callbacks facility.
>
> Signed-off-by: Chandan Rajendra
On Sunday, August 18, 2019 7:15:42 PM IST Chao Yu wrote:
> Hi Chandan,
>
> On 2019-8-16 14:18, Chandan Rajendra wrote:
> > F2FS has a copy of "post read processing" code using which encrypted
> > file data is decrypted. This commit replaces it to make use of
On Tuesday, August 20, 2019 11:01 PM Jaegeuk Kim wrote:
> Hi Chandan,
>
> On 08/20, Theodore Y. Ts'o wrote:
> > On Tue, Aug 20, 2019 at 10:35:29AM +0530, Chandan Rajendra wrote:
> > > Looks like F2FS requires a lot more flexiblity than what can be offered by
101 - 178 of 178 matches
Mail list logo