@@ -84,6 +84,8 @@ config MANDATORY_FILE_LOCKING
To the best of my knowledge this is dead code that no one cares about.
+source "fs/crypto/Kconfig"
+
source "fs/notify/Kconfig"
source "fs/quota/Kconfig"
@@ -30,6 +30,7 @@ obj-$(CONFIG_EVENTFD) += eventfd.o
obj-$(CONFIG_USERFAULTFD) += userfaultfd.o
obj-$(CONFIG_AIO) += aio.o
obj-$(CONFIG_FS_DAX) += dax.o
+obj-y += crypto/
obj-$(CONFIG_FILE_LOCKING) += locks.o
obj-$(CONFIG_COMPAT) += compat.o compat_ioctl.o
obj-$(CONFIG_BINFMT_AOUT) += binfmt_aout.o
new file mode 100644
@@ -0,0 +1,16 @@
+config FS_ENCRYPTION
+ bool "FS Encryption (Per-file encryption)"
+ select CRYPTO_AES
+ select CRYPTO_CBC
+ select CRYPTO_ECB
+ select CRYPTO_XTS
+ select CRYPTO_CTS
+ select CRYPTO_CTR
+ select CRYPTO_SHA256
+ select KEYS
+ select ENCRYPTED_KEYS
+ help
+ Enable encryption of files and directories. This
+ feature is similar to ecryptfs, but it is more memory
+ efficient since it avoids caching the encrypted and
+ decrypted pages in the page cache.
new file mode 100644
@@ -0,0 +1,2 @@
+obj-y += fname.o
+obj-$(CONFIG_FS_ENCRYPTION) += crypto.o policy.o keyinfo.o
This patch adds a facility to enable per-file encryption. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- fs/Kconfig | 2 ++ fs/Makefile | 1 + fs/crypto/Kconfig | 16 ++++++++++++++++ fs/crypto/Makefile | 2 ++ 4 files changed, 21 insertions(+) create mode 100644 fs/crypto/Kconfig create mode 100644 fs/crypto/Makefile