From: Eric Biggers <ebiggers@kernel.org>
To: linux-ext4@vger.kernel.org
Cc: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Chandan Rajendra <chandan@linux.ibm.com>
Subject: Re: [PATCH 1/2] fs/buffer.c: support fscrypt in block_read_full_page()
Date: Fri, 18 Oct 2019 20:16:34 -0700 [thread overview]
Message-ID: <20191019031634.GA76786@sol.localdomain> (raw)
In-Reply-To: <20191016221142.298754-2-ebiggers@kernel.org>
On Wed, Oct 16, 2019 at 03:11:41PM -0700, Eric Biggers wrote:
> +static void end_buffer_async_read_io(struct buffer_head *bh, int uptodate)
> +{
> + /* Decrypt if needed */
> + if (uptodate && IS_ENABLED(CONFIG_FS_ENCRYPTION) &&
> + IS_ENCRYPTED(bh->b_page->mapping->host)) {
> + struct decrypt_bh_ctx *ctx = kmalloc(sizeof(*ctx), GFP_ATOMIC);
Technically this should check S_ISREG() too (though it happens not to make a
difference currently). I'll fix it in the next version of this patchset.
We probably should add a helper function fscrypt_needs_contents_encryption()
that returns IS_ENABLED(CONFIG_FS_ENCRYPTION) && IS_ENCRYPTED() && S_ISREG().
- Eric
next prev parent reply other threads:[~2019-10-19 3:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 22:11 [PATCH 0/2] ext4: support encryption with blocksize != PAGE_SIZE Eric Biggers
2019-10-16 22:11 ` [PATCH 1/2] fs/buffer.c: support fscrypt in block_read_full_page() Eric Biggers
2019-10-19 3:16 ` Eric Biggers [this message]
2019-10-16 22:11 ` [PATCH 2/2] ext4: Enable encryption for subpage-sized blocks Eric Biggers
2019-10-17 6:14 ` [PATCH 0/2] ext4: support encryption with blocksize != PAGE_SIZE Chandan Rajendra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191019031634.GA76786@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=chandan@linux.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).