[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3f489f1-3ec0-e8c8-d5ae-ea6b9e5d5571@nod.at>
Date: Thu, 22 Sep 2016 10:49:41 +0200
From: Richard Weinberger <richard@....at>
To: Theodore Ts'o <tytso@....edu>, Jaegeuk Kim <jaegeuk@...nel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
David Gstir <david@...ma-star.at>
Subject: fscrypt: in-place decrypt vs. out-of-place encrypt?
Hi!
While reading the fscrypt code I noticed that some functions use the bounce pages
and some not.
fscrypt_decrypt_page() and fscrypt_decrypt_bio_pages() work in-place while
fscrypt_encrypt_page() and fscrypt_zeroout_range() use a bounce page.
So, both ext4 and f2fs encrypt data using an extra buffer but decrypt mostly
in-place without the need of an extra buffer.
Why that? I'd assume when decryption can be done in-place also encryption is possible
that way.
I'm working on fscrypt for UBIFS and would like to avoid an extra buffer since memory
is low on embedded systems.
Thanks,
//richard
Powered by blists - more mailing lists