From: Daniel Rosenberg <drosen@google.com>
To: "Theodore Ts'o" <tytso@mit.edu>,
linux-ext4@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
Chao Yu <chao@kernel.org>,
linux-f2fs-devel@lists.sourceforge.net,
Eric Biggers <ebiggers@kernel.org>,
linux-fscrypt@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org,
Andreas Dilger <adilger.kernel@dilger.ca>,
Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
Gabriel Krisman Bertazi <krisman@collabora.com>,
kernel-team@android.com, Daniel Rosenberg <drosen@google.com>
Subject: [PATCH v6 0/5] Support fof Casefolding and Encryption
Date: Tue, 28 Jan 2020 15:03:23 -0800 [thread overview]
Message-ID: <20200128230328.183524-1-drosen@google.com> (raw)
These patches are all on top of fscrypt's development branch
Ext4 and F2FS currently both support casefolding and encryption, but not at
the same time. These patches aim to rectify that.
I moved the identical casefolding dcache operations for ext4 and f2fs into
fs/unicode, as all filesystems using casefolded names will want them.
I've also adjust fscrypt to not set it's d_revalidate operation during it's
prepare lookup, instead having the calling filesystem set it up. This is
done to that the filesystem may have it's own dentry_operations.
For Ext4, since the hash for encrypted casefolded directory names cannot be
computed without the key, we need to store the hash on disk. We only do so
for encrypted and casefolded directories to avoid on disk format changes.
Previously encryption and casefolding could not be on the same filesystem,
and we're relaxing that requirement. F2fs is a bit more straightforward
since it already stores hashes on disk.
I've updated the related tools with just enough to enable the feature. I
still need to adjust ext4's fsck's, although without access to the keys,
neither fsck will be able to verify the hashes of casefolded and encrypted
names.
v6 changes:
Went back to using dentry_operations for casefolding. Provided standard
implementations in fs/unicode, avoiding extra allocation in d_hash op.
Moved fscrypt d_ops setting to be filesystem's responsibility to maintain
compatibility with casefolding and overlayfs if casefolding is not used
fixes some f2fs error handling
v4-5: patches submitted on fscrypt
v3 changes:
fscrypt patch only creates hash key if it will be needed.
Rebased on top of fscrypt branch, reconstified match functions in ext4/f2fs
v2 changes:
fscrypt moved to separate thread to rebase on fscrypt dev branch
addressed feedback, plus some minor fixes
Daniel Rosenberg (5):
unicode: Add standard casefolded d_ops
fscrypt: Have filesystems handle their d_ops
f2fs: Handle casefolding with Encryption
ext4: Hande casefolding with encryption
ext4: Optimize match for casefolded encrypted dirs
Documentation/filesystems/ext4/directory.rst | 27 ++
fs/crypto/fname.c | 7 +-
fs/crypto/fscrypt_private.h | 1 -
fs/crypto/hooks.c | 1 -
fs/ext4/dir.c | 102 +++---
fs/ext4/ext4.h | 86 +++--
fs/ext4/hash.c | 26 +-
fs/ext4/ialloc.c | 5 +-
fs/ext4/inline.c | 41 ++-
fs/ext4/namei.c | 325 ++++++++++++-------
fs/ext4/super.c | 21 +-
fs/f2fs/dir.c | 151 +++++----
fs/f2fs/f2fs.h | 16 +-
fs/f2fs/hash.c | 25 +-
fs/f2fs/inline.c | 9 +-
fs/f2fs/namei.c | 1 +
fs/f2fs/super.c | 17 +-
fs/f2fs/sysfs.c | 8 +-
fs/ubifs/dir.c | 18 +
fs/unicode/utf8-core.c | 61 ++++
include/linux/fs.h | 10 +
include/linux/fscrypt.h | 6 +-
include/linux/unicode.h | 17 +
23 files changed, 644 insertions(+), 337 deletions(-)
--
2.25.0.341.g760bfbb309-goog
next reply other threads:[~2020-01-28 23:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 23:03 Daniel Rosenberg [this message]
2020-01-28 23:03 ` [PATCH v6 1/5] unicode: Add standard casefolded d_ops Daniel Rosenberg
2020-02-03 1:45 ` Gabriel Krisman Bertazi
2020-02-05 3:05 ` Daniel Rosenberg
2020-02-05 4:21 ` Gabriel Krisman Bertazi
2020-02-05 23:40 ` Daniel Rosenberg
2020-01-28 23:03 ` [PATCH v6 2/5] fscrypt: Have filesystems handle their d_ops Daniel Rosenberg
2020-01-28 23:03 ` [PATCH v6 3/5] f2fs: Handle casefolding with Encryption Daniel Rosenberg
2020-01-28 23:03 ` [PATCH v6 4/5] ext4: Hande casefolding with encryption Daniel Rosenberg
2020-01-28 23:03 ` [PATCH v6 5/5] ext4: Optimize match for casefolded encrypted dirs Daniel Rosenberg
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=20200128230328.183524-1-drosen@google.com \
--to=drosen@google.com \
--cc=adilger.kernel@dilger.ca \
--cc=chao@kernel.org \
--cc=corbet@lwn.net \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=kernel-team@android.com \
--cc=krisman@collabora.com \
--cc=linux-doc@vger.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-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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).