linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fscrypt: in-place decrypt vs. out-of-place encrypt?
@ 2016-09-22  8:49 Richard Weinberger
  2016-09-22 13:14 ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Weinberger @ 2016-09-22  8:49 UTC (permalink / raw)
  To: Theodore Ts'o, Jaegeuk Kim
  Cc: linux-kernel@vger.kernel.org, linux-fsdevel, linux-ext4,
	linux-f2fs-devel, David Gstir

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-22 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22  8:49 fscrypt: in-place decrypt vs. out-of-place encrypt? Richard Weinberger
2016-09-22 13:14 ` Theodore Ts'o
2016-09-22 14:13   ` Richard Weinberger

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).