lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 14 Apr 2019 17:08:00 +0530 From: Chandan Rajendra <chandan@...ux.ibm.com> To: linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, linux-fscrypt@...r.kernel.org Cc: Chandan Rajendra <chandan@...ux.ibm.com>, tytso@....edu, adilger.kernel@...ger.ca, ebiggers@...nel.org, jaegeuk@...nel.org, yuchao0@...wei.com Subject: [RFC PATCH V2 10/14] ext4: Decrypt the block that needs to be partially zeroed __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 <chandan@...ux.ibm.com> --- fs/ext4/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 51744a3c3964..ade1816697a8 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4080,9 +4080,10 @@ static int __ext4_block_zero_page_range(handle_t *handle, if (S_ISREG(inode->i_mode) && IS_ENCRYPTED(inode)) { /* We expect the key to be set. */ BUG_ON(!fscrypt_has_encryption_key(inode)); - BUG_ON(blocksize != PAGE_SIZE); WARN_ON_ONCE(fscrypt_decrypt_page(page->mapping->host, - page, PAGE_SIZE, 0, page->index)); + page, blocksize, + round_down(offset, blocksize), + iblock)); } } if (ext4_should_journal_data(inode)) { -- 2.19.1
Powered by blists - more mailing lists