linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Eric Biggers <ebiggers@google.com>,
	Eric Biggers <ebiggers3@gmail.com>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH v2 05/11] fscrypt: split fscrypt_dummy_context_enabled() into supp/notsupp versions
Date: Fri, 5 Jan 2018 21:49:44 -0500	[thread overview]
Message-ID: <20180106024944.GA2404@thunk.org> (raw)
In-Reply-To: <20180106003950.GC72343@jaegeuk-macbookpro.roam.corp.google.com>

On Fri, Jan 05, 2018 at 04:39:50PM -0800, Jaegeuk Kim wrote:
> 
> Agreed that dummy'd be easy to go for now tho, doesn't it give any security
> concern at all, even only for ext4 testing purpose? Is there a chance to hack
> the mount option in runtime? BTW, it may be doable to build an encrypt root
> inode having encrypted dentry of lost_found, given dummy_context in mke2fs.
> I'm just curious whether or not it'd be worth to do.

It requires root to manipulate the mount option; and if you don't
trust root, you've got other problems.

The problem is that e2fsck needs to be able to repair a file system
without having access to any of the file system keys.  And so if there
is an orphaned inode (e.g., an inode which is not attached to any
directory), we need to put it somewhere, and that's /lost+found.

I've considered making lost+found a magic directory which isn't
directly linked into the root directory, and have a magic namei
lookup.  There are downsides though; that would mean that the
/lost+found filename has to be magic --- what to do if the user tries
to create a lost+found directory, or rename the magic lost+found
directory.

Ultimately, i decided it wasn't worth the semantic and
implementational complexity, especially since none of the primary use
cases (Android, Chromeos, etc.) needed an encrypted root directory.

      			  	       	  	    - Ted

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

  reply	other threads:[~2018-01-06  2:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 18:44 [PATCH v2 00/11] fscrypt: symlink helpers and fscrypt.h cleanup Eric Biggers
2018-01-05 18:44 ` [PATCH v2 01/11] fscrypt: move fscrypt_has_encryption_key() to supp/notsupp headers Eric Biggers
2018-01-05 18:44 ` [PATCH v2 02/11] fscrypt: move fscrypt_control_page() " Eric Biggers
2018-01-05 18:44 ` [PATCH v2 03/11] fscrypt: move fscrypt_info_cachep declaration to fscrypt_private.h Eric Biggers
2018-01-05 18:44 ` [PATCH v2 04/11] fscrypt: move fscrypt_ctx declaration to fscrypt_supp.h Eric Biggers
2018-01-05 18:44 ` [PATCH v2 05/11] fscrypt: split fscrypt_dummy_context_enabled() into supp/notsupp versions Eric Biggers
2018-01-05 20:40   ` Jaegeuk Kim
2018-01-05 21:18     ` Eric Biggers
2018-01-05 21:36       ` Jaegeuk Kim
2018-01-05 22:01         ` Eric Biggers
2018-01-06  0:39           ` Jaegeuk Kim
2018-01-06  2:49             ` Theodore Ts'o [this message]
2018-01-05 18:44 ` [PATCH v2 06/11] fscrypt: move fscrypt_operations declaration to fscrypt_supp.h Eric Biggers
2018-01-05 18:44 ` [PATCH v2 07/11] fscrypt: move fscrypt_valid_enc_modes() to fscrypt_private.h Eric Biggers
2018-01-05 18:44 ` [PATCH v2 08/11] fscrypt: move fscrypt_is_dot_dotdot() to fs/crypto/fname.c Eric Biggers
2018-01-05 18:45 ` [PATCH v2 09/11] fscrypt: trim down fscrypt.h includes Eric Biggers
2018-01-05 18:45 ` [PATCH v2 10/11] fscrypt: new helper functions for ->symlink() Eric Biggers
2018-01-05 18:45 ` [PATCH v2 11/11] fscrypt: new helper function - fscrypt_get_symlink() Eric Biggers
2018-01-12  4:33 ` [PATCH v2 00/11] fscrypt: symlink helpers and fscrypt.h cleanup Theodore Ts'o
2018-01-16 23:46   ` Jaegeuk Kim

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=20180106024944.GA2404@thunk.org \
    --to=tytso@mit.edu \
    --cc=ebiggers3@gmail.com \
    --cc=ebiggers@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).