From: Eric Biggers <ebiggers3@gmail.com>
To: linux-fscrypt@vger.kernel.org, "Theodore Y . Ts'o" <tytso@mit.edu>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-mtd@lists.infradead.org, Eric Biggers <ebiggers@google.com>
Subject: [PATCH v2 00/11] fscrypt: add some higher-level helper functions
Date: Mon, 9 Oct 2017 12:15:33 -0700 [thread overview]
Message-ID: <20171009191544.43656-1-ebiggers3@gmail.com> (raw)
From: Eric Biggers <ebiggers@google.com>
This series prepares to reduce code duplication among ext4, f2fs, and
ubifs by introducing a S_ENCRYPTED inode flag (so we don't have to call
back into the filesystem to test the filesystem-specific inode flag),
then introducing new helper functions that are called at the beginning
of the open, link, rename, lookup, and setattr operations.
In the future we maybe should even call these new helpers from the VFS
so that each individual filesystem doesn't have to do it. But that's
not possible currently because fs/crypto/ can be built as a module.
The patches to switch the filesystems over to use the helper functions
were included in v1 of this patchset. They are not included now since
I'm planning to get them picked up by the individual filesystem
maintainers after this goes in.
Changes since v1:
- Added Dave Chinner's patch to make fscrypt.h include
fscrypt_supp.h or fscrypt_notsupp.h, then reorganized the helpers
so that most are defined in fscrypt.h.
- As noted above, for now omitted the patches to switch the
individual filesystems over to the new helpers.
Dave Chinner (1):
fscrypt: clean up include file mess
Eric Biggers (10):
fs, fscrypt: add an S_ENCRYPTED inode flag
fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED()
fscrypt: remove ->is_encrypted()
fscrypt: remove unneeded empty fscrypt_operations structs
fscrypt: new helper function - fscrypt_require_key()
fscrypt: new helper function - fscrypt_file_open()
fscrypt: new helper function - fscrypt_prepare_link()
fscrypt: new helper function - fscrypt_prepare_rename()
fscrypt: new helper function - fscrypt_prepare_lookup()
fscrypt: new helper function - fscrypt_prepare_setattr()
fs/crypto/Makefile | 2 +-
fs/crypto/crypto.c | 2 +-
fs/crypto/fname.c | 3 +-
fs/crypto/fscrypt_private.h | 3 +-
fs/crypto/hooks.c | 112 +++++++++++++++
fs/crypto/keyinfo.c | 2 +-
fs/crypto/policy.c | 6 +-
fs/ext4/ext4.h | 8 +-
fs/ext4/inode.c | 7 +-
fs/ext4/super.c | 15 +-
fs/f2fs/f2fs.h | 9 +-
fs/f2fs/inode.c | 5 +-
fs/f2fs/super.c | 7 +-
fs/ubifs/crypto.c | 1 -
fs/ubifs/ioctl.c | 5 +-
fs/ubifs/super.c | 8 +-
fs/ubifs/ubifs.h | 18 +--
fs/ubifs/xattr.c | 1 +
include/linux/fs.h | 2 +
include/linux/fscrypt.h | 293 ++++++++++++++++++++++++++++++++++++++++
include/linux/fscrypt_common.h | 141 -------------------
include/linux/fscrypt_notsupp.h | 39 +++++-
include/linux/fscrypt_supp.h | 17 ++-
23 files changed, 505 insertions(+), 201 deletions(-)
create mode 100644 fs/crypto/hooks.c
create mode 100644 include/linux/fscrypt.h
delete mode 100644 include/linux/fscrypt_common.h
--
2.14.2.920.gcf0c67979c-goog
next reply other threads:[~2017-10-09 19:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 19:15 Eric Biggers [this message]
2017-10-09 19:15 ` [PATCH v2 01/11] fscrypt: clean up include file mess Eric Biggers
2017-10-09 19:15 ` [PATCH v2 02/11] fs, fscrypt: add an S_ENCRYPTED inode flag Eric Biggers
2017-10-09 19:15 ` [PATCH v2 03/11] fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED() Eric Biggers
2017-10-09 19:15 ` [PATCH v2 04/11] fscrypt: remove ->is_encrypted() Eric Biggers
2017-10-09 19:15 ` [PATCH v2 05/11] fscrypt: remove unneeded empty fscrypt_operations structs Eric Biggers
2017-10-09 19:15 ` [PATCH v2 06/11] fscrypt: new helper function - fscrypt_require_key() Eric Biggers
2017-10-09 19:15 ` [PATCH v2 07/11] fscrypt: new helper function - fscrypt_file_open() Eric Biggers
2017-10-09 19:15 ` [PATCH v2 08/11] fscrypt: new helper function - fscrypt_prepare_link() Eric Biggers
2017-10-09 19:15 ` [PATCH v2 09/11] fscrypt: new helper function - fscrypt_prepare_rename() Eric Biggers
2017-10-09 19:15 ` [PATCH v2 10/11] fscrypt: new helper function - fscrypt_prepare_lookup() Eric Biggers
2017-10-09 19:15 ` [PATCH v2 11/11] fscrypt: new helper function - fscrypt_prepare_setattr() Eric Biggers
2017-10-20 19:44 ` [PATCH v2 00/11] fscrypt: add some higher-level helper functions Theodore Ts'o
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=20171009191544.43656-1-ebiggers3@gmail.com \
--to=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 \
--cc=tytso@mit.edu \
/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).