]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
fs crypto: move per-file encryption from f2fs tree to fs/crypto
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 15 May 2015 23:26:10 +0000 (16:26 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 18 Mar 2016 04:19:33 +0000 (21:19 -0700)
commit0b81d0779072696371822e5ed9e7c6292e547024
treec75412a642ee596fd33a392f0f353c4c1185f7f5
parent59692b7c71e4271b62bddce5bfd50b9e805a4a02
fs crypto: move per-file encryption from f2fs tree to fs/crypto

This patch adds the renamed functions moved from the f2fs crypto files.

1. definitions for per-file encryption used by ext4 and f2fs.

2. crypto.c for encrypt/decrypt functions
 a. IO preparation:
  - fscrypt_get_ctx / fscrypt_release_ctx
 b. before IOs:
  - fscrypt_encrypt_page
  - fscrypt_decrypt_page
  - fscrypt_zeroout_range
 c. after IOs:
  - fscrypt_decrypt_bio_pages
  - fscrypt_pullback_bio_page
  - fscrypt_restore_control_page

3. policy.c supporting context management.
 a. For ioctls:
  - fscrypt_process_policy
  - fscrypt_get_policy
 b. For context permission
  - fscrypt_has_permitted_context
  - fscrypt_inherit_context

4. keyinfo.c to handle permissions
  - fscrypt_get_encryption_info
  - fscrypt_free_encryption_info

5. fname.c to support filename encryption
 a. general wrapper functions
  - fscrypt_fname_disk_to_usr
  - fscrypt_fname_usr_to_disk
  - fscrypt_setup_filename
  - fscrypt_free_filename

 b. specific filename handling functions
  - fscrypt_fname_alloc_buffer
  - fscrypt_fname_free_buffer

6. Makefile and Kconfig

Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Ildar Muslukhov <ildarm@google.com>
Signed-off-by: Uday Savagaonkar <savagaon@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
27 files changed:
fs/Kconfig
fs/Makefile
fs/crypto/Kconfig [new file with mode: 0644]
fs/crypto/Makefile [new file with mode: 0644]
fs/crypto/crypto.c [new file with mode: 0644]
fs/crypto/fname.c [new file with mode: 0644]
fs/crypto/keyinfo.c [new file with mode: 0644]
fs/crypto/policy.c [new file with mode: 0644]
fs/f2fs/Kconfig
fs/f2fs/Makefile
fs/f2fs/crypto.c [deleted file]
fs/f2fs/crypto_fname.c [deleted file]
fs/f2fs/crypto_key.c [deleted file]
fs/f2fs/crypto_policy.c [deleted file]
fs/f2fs/data.c
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/f2fs_crypto.h [deleted file]
fs/f2fs/file.c
fs/f2fs/inline.c
fs/f2fs/inode.c
fs/f2fs/namei.c
fs/f2fs/super.c
include/linux/dcache.h
include/linux/fs.h
include/linux/fscrypto.h [new file with mode: 0644]
include/uapi/linux/fs.h