1. 16 9月, 2016 1 次提交
    • E
      fscrypto: improved validation when loading inode encryption metadata · 8f39850d
      Eric Biggers 提交于
      - Validate fscrypt_context.format and fscrypt_context.flags.  If
        unrecognized values are set, then the kernel may not know how to
        interpret the encrypted file, so it should fail the operation.
      
      - Validate that AES_256_XTS is used for contents and that AES_256_CTS is
        used for filenames.  It was previously possible for the kernel to
        accept these reversed, though it would have taken manual editing of
        the block device.  This was not intended.
      
      - Fail cleanly rather than BUG()-ing if a file has an unexpected type.
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      8f39850d
  2. 08 5月, 2016 1 次提交
    • J
      fscrypto/f2fs: allow fs-specific key prefix for fs encryption · b5a7aef1
      Jaegeuk Kim 提交于
      This patch allows fscrypto to handle a second key prefix given by filesystem.
      The main reason is to provide backward compatibility, since previously f2fs
      used "f2fs:" as a crypto prefix instead of "fscrypt:".
      Later, ext4 should also provide key_prefix() to give "ext4:".
      
      One concern decribed by Ted would be kinda double check overhead of prefixes.
      In x86, for example, validate_user_key consumes 8 ms after boot-up, which turns
      out derive_key_aes() consumed most of the time to load specific crypto module.
      After such the cold miss, it shows almost zero latencies, which treats as a
      negligible overhead.
      Note that request_key() detects wrong prefix in prior to derive_key_aes() even.
      
      Cc: Ted Tso <tytso@mit.edu>
      Cc: stable@vger.kernel.org # v4.6
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      b5a7aef1
  3. 18 3月, 2016 1 次提交
    • J
      fs crypto: move per-file encryption from f2fs tree to fs/crypto · 0b81d077
      Jaegeuk Kim 提交于
      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: NMichael Halcrow <mhalcrow@google.com>
      Signed-off-by: NIldar Muslukhov <ildarm@google.com>
      Signed-off-by: NUday Savagaonkar <savagaon@google.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      0b81d077
  4. 23 2月, 2016 3 次提交
  5. 27 1月, 2016 1 次提交
  6. 21 10月, 2015 1 次提交
    • D
      KEYS: Merge the type-specific data with the payload data · 146aa8b1
      David Howells 提交于
      Merge the type-specific data with the payload data into one four-word chunk
      as it seems pointless to keep them separate.
      
      Use user_key_payload() for accessing the payloads of overloaded
      user-defined keys.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      cc: linux-cifs@vger.kernel.org
      cc: ecryptfs@vger.kernel.org
      cc: linux-ext4@vger.kernel.org
      cc: linux-f2fs-devel@lists.sourceforge.net
      cc: linux-nfs@vger.kernel.org
      cc: ceph-devel@vger.kernel.org
      cc: linux-ima-devel@lists.sourceforge.net
      146aa8b1
  7. 05 8月, 2015 1 次提交
  8. 02 6月, 2015 4 次提交
  9. 29 5月, 2015 1 次提交