1. 06 Nov, 2019 1 commit
  2. 21 Oct, 2019 4 commits
    • Eric Biggers's avatar
      docs: ioctl-number: document fscrypt ioctl numbers · 065ab4c4
      Eric Biggers authored
      The 'f' ioctls with numbers 19-26 decimal are currently used for fscrypt
      (a.k.a. ext4/f2fs/ubifs encryption), and up to 39 decimal is reserved
      for future fscrypt use, as per the comment in fs/ext4/ext4.h.  So the
      reserved range is 13-27 hex.
      
      Document this in ioctl-number.rst.
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      065ab4c4
    • Eric Biggers's avatar
      fscrypt: zeroize fscrypt_info before freeing · 6f99756d
      Eric Biggers authored
      memset the struct fscrypt_info to zero before freeing.  This isn't
      really needed currently, since there's no secret key directly in the
      fscrypt_info.  But there's a decent chance that someone will add such a
      field in the future, e.g. in order to use an API that takes a raw key
      such as siphash().  So it's good to do this as a hardening measure.
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      6f99756d
    • Eric Biggers's avatar
      fscrypt: remove struct fscrypt_ctx · 1565bdad
      Eric Biggers authored
      Now that ext4 and f2fs implement their own post-read workflow that
      supports both fscrypt and fsverity, the fscrypt-only workflow based
      around struct fscrypt_ctx is no longer used.  So remove the unused code.
      
      This is based on a patch from Chandan Rajendra's "Consolidate FS read
      I/O callbacks code" patchset, but rebased onto the latest kernel, folded
      __fscrypt_decrypt_bio() into fscrypt_decrypt_bio(), cleaned up
      fscrypt_initialize(), and updated the commit message.
      
      Originally-from: Chandan Rajendra <chandan@linux.ibm.com>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      1565bdad
    • Eric Biggers's avatar
      fscrypt: invoke crypto API for ESSIV handling · 4006d799
      Eric Biggers authored
      Instead of open-coding the calculations for ESSIV handling, use an ESSIV
      skcipher which does all of this under the hood.  ESSIV was added to the
      crypto API in v5.4.
      
      This is based on a patch from Ard Biesheuvel, but reworked to apply
      after all the fscrypt changes that went into v5.4.
      
      Tested with 'kvm-xfstests -c ext4,f2fs -g encrypt', including the
      ciphertext verification tests for v1 and v2 encryption policies.
      
      Originally-from: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      4006d799
  3. 20 Oct, 2019 6 commits
  4. 19 Oct, 2019 29 commits