[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161021151445.xcqzggh27nzdqmuh@thunk.org>
Date: Fri, 21 Oct 2016 11:14:45 -0400
From: Theodore Ts'o <tytso@....edu>
To: Christoph Hellwig <hch@...radead.org>
Cc: Richard Weinberger <richard@....at>, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
dedekind1@...il.com, adrian.hunter@...el.com, jaegeuk@...nel.org,
david@...ma-star.at, wd@...x.de, sbabic@...x.de,
dengler@...utronix.de
Subject: Re: [PATCH 01/26] fscrypto: Add buffer operations
On Fri, Oct 21, 2016 at 06:24:00AM -0700, Christoph Hellwig wrote:
> > Another reason why I did the buffer functions is because fscrypt_encrypt_page()
> > always allocates a bounce page as temporary memory. For ext4 this is needed,
> > for UBIFS not.
> > UBIFS has already a construction buffer, especially since it also does compression.
>
> We should defintively find a way to avoid that, but it's a separate
> issue from adding another API just to pass buffers.
Hmm, one approach we could use is to avoid allocating a bounce page if
the passed-in plaintext_page has the PageSlab flag set. That would
work for ubifs, but if there are file systems that are using
get_free_page() for their particular construction buffer. it wouldn't
work for them.
Perhaps more importantly, are you planning on making compression +
encryption work? Some security purists will say that compression +
encryption will leak some information about the plaintext (which is
technically true, but it's much like the people who don't want make it
easy to discard + encrypt, which Linus recently railed against). So
my take is that as long as users understand that there are minor
leakage issues with compression + encryption, we should let them do
that --- and that would be an argument for supporting buffer
operations, and only requiring that the buffer size must be a multiple
of the underlying encryption block size.
- Ted
Powered by blists - more mailing lists