Commit graph

2 commits

Author SHA1 Message Date
Eric Biggers
96101a1c1f ANDROID: block: make blk_crypto_start_using_mode() properly check for support
If blk-crypto-fallback is needed but is disabled by kconfig, make
blk_crypto_start_using_mode() return an error rather than succeeding.
Use ENOPKG, which matches the error code used by fscrypt when crypto API
support is missing with fs-layer encryption.

Also, if blk-crypto-fallback is needed but the algorithm is missing from
the kernel's crypto API, change the error code from ENOENT to ENOPKG.

This is needed for VtsKernelEncryptionTest to pass on some devices.

Bug: 137270441
Bug: 151100202
Test: 'atest vts_kernel_encryption_test' on Pixel 4 with the
      inline crypto patches backported, and also on Cuttlefish.
Change-Id: Iedf00ca8e48c74a5d4c40b12712f38738a04ef11
Signed-off-by: Eric Biggers <ebiggers@google.com>
Git-commit: ce1ccfb9ef
Git-repo: https://android.googlesource.com/kernel/common/+/refs/heads/android-4.19
[neersoni@codeaurora.org: Back port the change]
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2020-07-08 10:18:54 -07:00
Blagovest Kolenichev
49875670fa File and metadata encryption changes from android-4.19.96-107
Added required changes to fit properly android-4.19.79-95
crypto content into msm-4.19 branch. Modifications in
abi_gki_aarch64.xml are discarded completely. The order of
applying is bottom to top:

1f876610fe ANDROID: dm: Add wrapped key support in dm-default-key
b785dbcb87 ANDROID: dm: add support for passing through derive_raw_secret
66b3c81270 ANDROID: block: Prevent crypto fallback for wrapped keys
36500bffb9 fscrypt: support passing a keyring key to FS_IOC_ADD_ENCRYPTION_KEY
b32863f17f ANDROID: dm: add dm-default-key target for metadata encryption
94706caf62 ANDROID: dm: enable may_passthrough_inline_crypto on some targets
44e1174c18 ANDROID: dm: add support for passing through inline crypto support
e65d08ae68 ANDROID: block: Introduce passthrough keyslot manager
8f48f6657d ANDROID: ext4, f2fs: enable direct I/O with inline encryption
bbee78199f FROMLIST: scsi: ufs: add program_key() variant op
0f1c72a2f5 ANDROID: block: export symbols needed for modules to use inline crypto
35b62551b9 ANDROID: block: fix some inline crypto bugs
23b81578bf ANDROID: fscrypt: add support for hardware-wrapped keys
a076eebee0 ANDROID: block: add KSM op to derive software secret from wrapped key
3e8c41805f ANDROID: block: provide key size as input to inline crypto APIs
bb7f6203fb ANDROID: ufshcd-crypto: export cap find API
b01c73ea71 BACKPORT: FROMLIST: Update Inline Encryption from v5 to v6 of patch series

Change-Id: Ic741913aa478500da94a52eace02bb9192e581b9
Git-repo: https://android.googlesource.com/kernel/common/+/refs/heads/android-4.19
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2020-04-21 06:19:04 -07:00