android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers 0367acdde3 ANDROID: block: require drivers to declare supported crypto key type(s)
We need a way to tell which type of keys the inline crypto hardware
supports (standard, wrapped, or both), so that fallbacks can be used
when needed (either blk-crypto-fallback, or fscrypt fs-layer crypto).

We can't simply assume that

    keyslot_mgmt_ll_ops::derive_raw_secret == NULL

means only standard keys are supported and that

    keyslot_mgmt_ll_ops::derive_raw_secret != NULL

means that only wrapped keys are supported, because device-mapper
devices always implement this method.  Also, hardware might support both
types of keys.

Therefore, add a field keyslot_manager::features which contains a
bitmask of flags which indicate the supported types of keys.  Drivers
will need to fill this in.  This patch makes the UFS standard crypto
code set BLK_CRYPTO_FEATURE_STANDARD_KEYS, but UFS variant drivers may
need to set BLK_CRYPTO_FEATURE_WRAPPED_KEYS instead.

Then, make keyslot_manager_crypto_mode_supported() take the key type
into account.

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: Ied846c2767c1fd2f438792dcfd3649157e68b005
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-04-07 17:58:49 +00:00
..
acpi ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro 2020-03-05 16:43:42 +01:00
asm-generic This is the 5.4.24 stable release 2020-03-05 17:42:40 +01:00
clocksource
crypto UPSTREAM: crypto: x86 - Regularize glue function prototypes 2020-02-10 23:21:58 +00:00
drm Revert "ANDROID: drm: edid: add support for additional CEA extension blocks" 2020-03-16 01:41:14 +00:00
dt-bindings clk: imx8mn: Fix incorrect clock defines 2020-03-18 07:17:55 +01:00
keys
kvm
linux ANDROID: block: require drivers to declare supported crypto key type(s) 2020-04-07 17:58:49 +00:00
math-emu
media FROMLIST: media: v4l2-fh: define v4l2_fh struct regardless of condition 2020-03-25 16:22:50 +00:00
misc
net This is the 5.4.29 stable release 2020-04-02 14:26:14 +02:00
pcmcia
ras
rdma IB/core: Let IB core distribute cache update events 2020-02-24 08:36:26 +01:00
scsi This is the 5.4.23 stable release 2020-03-01 10:17:44 +01:00
soc
sound This is the 5.4.23 stable release 2020-03-01 10:17:44 +01:00
target
trace This is the 5.4.29 stable release 2020-04-02 14:26:14 +02:00
uapi ANDROID: Incremental fs: Protect get_fill_block, and add a field 2020-04-03 17:20:28 +00:00
vdso
video
xen