1. 14 Nov, 2019 2 commits
    • Chandan Rajendra's avatar
      ext4: Enable encryption for subpage-sized blocks · 196624e1
      Chandan Rajendra authored
      Now that we have the code to support encryption for subpage-sized
      blocks, this commit removes the conditional check in filesystem mount
      code.
      
      The commit also changes the support statement in
      Documentation/filesystems/fscrypt.rst to reflect the fact that
      encryption on filesystems with blocksize less than page size now works.
      
      [EB: Tested with 'gce-xfstests -c ext4/encrypt_1k -g auto', using the
      new "encrypt_1k" config I created.  All tests pass except for those that
      already fail or are excluded with the encrypt or 1k configs, and 2 tests
      that try to create 1023-byte symlinks which fails since encrypted
      symlinks are limited to blocksize-3 bytes.  Also ran the dedicated
      encryption tests using 'kvm-xfstests -c ext4/1k -g encrypt'; all pass,
      including the on-disk ciphertext verification tests.]
      Signed-off-by: default avatarChandan Rajendra <chandan@linux.ibm.com>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Link: https://lore.kernel.org/r/20191023033312.361355-3-ebiggers@kernel.orgSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      196624e1
    • Eric Biggers's avatar
      fs/buffer.c: support fscrypt in block_read_full_page() · 31fb992c
      Eric Biggers authored
      After each filesystem block (as represented by a buffer_head) has been
      read from disk by block_read_full_page(), decrypt it if needed.  The
      decryption is done on the fscrypt_read_workqueue.
      
      This is the final change needed to support ext4 encryption with
      blocksize != PAGE_SIZE, and it's a fairly small change now that
      CONFIG_FS_ENCRYPTION is a bool and fs/crypto/ exposes functions to
      decrypt individual blocks and to enqueue work on the fscrypt workqueue.
      
      Don't try to add fs-verity support yet, as the fs/verity/ support layer
      isn't ready for sub-page blocks yet.  Just add fscrypt support for now.
      
      Almost all the new code is compiled away when CONFIG_FS_ENCRYPTION=n.
      
      Cc: Chandan Rajendra <chandan@linux.ibm.com>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Link: https://lore.kernel.org/r/20191023033312.361355-2-ebiggers@kernel.orgSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      31fb992c
  2. 11 Nov, 2019 1 commit
  3. 05 Nov, 2019 37 commits