public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jari Ruusu <jariruusu@users.sourceforge.net>
To: markus reichelt <ml@mareichelt.de>
Cc: emin ak <eminak71@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: encrypting jffs2 filesystem with DM-crypt or what else?
Date: Tue, 06 Mar 2007 21:32:19 +0200	[thread overview]
Message-ID: <45EDC1C3.548EB915@users.sourceforge.net> (raw)
In-Reply-To: 20070306130524.GG4168@tatooine.rebelbase.local

markus reichelt wrote:
> * emin ak <eminak71@gmail.com> wrote:
> > I need to encrypt a jffs2/mtd formatted flash filesystem for an
> > embedded device, Normally using a loopback interface (cryptoloop,
> > DM-crypt or loop-aes) solves this problem but they are not well
> > known on journalling file systems (like jffs2) because of cached
> > write etc.. Also I could'nt find any guideline for encrypting
> > fikesystem on a flash.
> 
> device-backed loops are ok, file-based once aren't. The cache issue
> you talk about concerns writing caches of HDDs f.e., I haven't seen a
> flash device with writing cache. However, in most cases writing cache
> can be turned off.

Flash devices behave differently than hard disks. If I remember correcly,
bits can be flipped in one direction (set or reset) without erasing whole
block, but flipping a bit in reverse direction requires that whole block be
erased first.

If jffs2 takes advantage of this one-direction-bit-flipping, then adding
encryption layer between jffs2 and flash device makes it completely
different game that is guaranteed to require lots of flash block erases that
wears down the device much faster than expected.

-- 
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD

      reply	other threads:[~2007-03-06 19:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06 12:05 encrypting jffs2 filesystem with DM-crypt or what else? emin ak
2007-03-06 13:05 ` markus reichelt
2007-03-06 19:32   ` Jari Ruusu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45EDC1C3.548EB915@users.sourceforge.net \
    --to=jariruusu@users.sourceforge.net \
    --cc=eminak71@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ml@mareichelt.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox