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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191019031634.GA76786@sol.localdomain>
Date:   Fri, 18 Oct 2019 20:16:34 -0700
From:   Eric Biggers <ebiggers@...nel.org>
To:     linux-ext4@...r.kernel.org
Cc:     linux-fscrypt@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Chandan Rajendra <chandan@...ux.ibm.com>
Subject: Re: [PATCH 1/2] fs/buffer.c: support fscrypt in
 block_read_full_page()

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ