android_kernel_oneplus_msm8998/fs/crypto
Eric Biggers f478c9bfbb fscrypt: allow synchronous bio decryption
Cherry-pick from origin/upstream-f2fs-stable-linux-4.4.y:
  13890bed20 ("fscrypt: allow synchronous bio decryption")

Currently, fscrypt provides fscrypt_decrypt_bio_pages() which decrypts a
bio's pages asynchronously, then unlocks them afterwards.  But, this
assumes that decryption is the last "postprocessing step" for the bio,
so it's incompatible with additional postprocessing steps such as
authenticity verification after decryption.

Therefore, rename the existing fscrypt_decrypt_bio_pages() to
fscrypt_enqueue_decrypt_bio().  Then, add fscrypt_decrypt_bio() which
decrypts the pages in the bio synchronously without unlocking the pages,
nor setting them Uptodate; and add fscrypt_enqueue_decrypt_work(), which
enqueues work on the fscrypt_read_workqueue.  The new functions will be
used by filesystems that support both fscrypt and fs-verity.

Change-Id: I99f1c7bfb79381f6e4abf2b1f418776b19bd8e08
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2018-04-20 22:30:46 -07:00
..
bio.c fscrypt: allow synchronous bio decryption 2018-04-20 22:30:46 -07:00
crypto.c fscrypt: allow synchronous bio decryption 2018-04-20 22:30:46 -07:00
fname.c f2fs/fscrypt: updates to v4.17-rc1 2018-04-12 09:58:05 -07:00
fscrypt_private.h fscrypt: allow synchronous bio decryption 2018-04-20 22:30:46 -07:00
hooks.c f2fs/fscrypt: updates to v4.17-rc1 2018-04-12 09:58:05 -07:00
Kconfig f2fs: backport from (4c1fad64 - Merge tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs) 2017-09-25 14:27:55 -07:00
keyinfo.c f2fs/fscrypt: updates to v4.17-rc1 2018-04-12 09:58:05 -07:00
Makefile fscrypt: updates on 4.15-rc4 2018-01-15 12:45:46 +00:00
policy.c fscrypt: updates on 4.15-rc4 2018-01-15 12:45:46 +00:00