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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161202081249.GB18690@google.com>
Date:   Fri, 2 Dec 2016 00:12:49 -0800
From:   Eric Biggers <ebiggers@...gle.com>
To:     Richard Weinberger <richard@....at>
Cc:     linux-mtd@...ts.infradead.org, david@...ma-star.at, tytso@....edu,
        dedekind1@...il.com, mhalcrow@...gle.com, adrian.hunter@...el.com,
        linux-kernel@...r.kernel.org, hch@...radead.org,
        linux-fsdevel@...r.kernel.org, jaegeuk@...nel.org,
        dengler@...utronix.de, sbabic@...x.de, wd@...x.de
Subject: Re: [PATCH 2/6] fscrypt: Release fscrypt context on in-place
 encryption

On Thu, Dec 01, 2016 at 11:14:54PM +0100, Richard Weinberger wrote:
> From: David Gstir <david@...ma-star.at>
> 
> In case of in-place encryption ctx must be released right away.
> Otherwise ctx is never freed.
> 

I didn't notice this before, but the fscrypt_ctx isn't actually used at all in
the "own pages" crypto case.  So there's really no need to allocate one.  How
about we just handle the "own pages" case at the beginning of
fscrypt_encrypt_page():

	if (inode->i_sb->s_cop->flags & FS_CFLG_OWN_PAGES) {
		err = do_page_crypto(inode, FS_ENCRYPT, lblk_num, page, page,
				     len, offs, gfp_flags);
		if (err)
			return ERR_PTR(err);
		return page;
	}

	(and the rest essentially the same as it used to be)

Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ