android_kernel_motorola_sm6375/block
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
..
partitions
badblocks.c
bfq-cgroup.c block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group() 2020-03-25 08:25:49 +01:00
bfq-iosched.c block, bfq: remove ifdefs from around gets/puts of bfq groups 2020-03-12 13:00:32 +01:00
bfq-iosched.h block, bfq: remove ifdefs from around gets/puts of bfq groups 2020-03-12 13:00:32 +01:00
bfq-wf2q.c block, bfq: get a ref to a group when adding it to a service tree 2020-03-12 13:00:32 +01:00
bio-crypt-ctx.c ANDROID: dm: add dm-default-key target for metadata encryption 2020-01-24 10:52:54 -08:00
bio-integrity.c block: fix memleak of bio integrity data 2020-01-26 10:01:09 +01:00
bio.c This is the 5.4.15 stable release 2020-01-26 11:14:46 +01:00
blk-cgroup.c blkcg: make blkcg_print_stat() print stats only for online blkgs 2019-11-06 17:08:38 -07:00
blk-core.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4 2020-01-15 16:41:51 -08:00
blk-crypto-fallback.c ANDROID: block: require drivers to declare supported crypto key type(s) 2020-04-07 17:58:49 +00:00
blk-crypto-internal.h ANDROID: block: make blk_crypto_start_using_mode() properly check for support 2020-04-07 17:58:39 +00:00
blk-crypto.c ANDROID: block: require drivers to declare supported crypto key type(s) 2020-04-07 17:58:49 +00:00
blk-exec.c
blk-flush.c blk-mq: insert passthrough request into hctx->dispatch directly 2020-03-21 08:11:52 +01:00
blk-integrity.c
blk-ioc.c
blk-iocost.c blk-iocost: fix incorrect vtime comparison in iocg_is_idle() 2020-03-18 07:17:52 +01:00
blk-iolatency.c
blk-lib.c
blk-map.c block: fix memleak when __blk_rq_map_user_iov() is failed 2020-01-12 12:21:43 +01:00
blk-merge.c BACKPORT: FROMLIST: Update Inline Encryption from v5 to v6 of patch series 2020-01-13 18:46:44 +00:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c blk-mq: insert flush request to the front of dispatch queue 2020-03-21 08:11:57 +01:00
blk-mq-sched.h
blk-mq-sysfs.c blk-mq: make sure that line break can be printed 2019-12-17 19:56:53 +01:00
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c ANDROID: modularize BLK_MQ_VIRTIO 2020-01-31 16:27:30 -08:00
blk-mq.c blk-mq: insert passthrough request into hctx->dispatch directly 2020-03-21 08:11:52 +01:00
blk-mq.h blk-mq: insert passthrough request into hctx->dispatch directly 2020-03-21 08:11:52 +01:00
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c block: fix an integer overflow in logical block size 2020-01-23 08:22:32 +01:00
blk-softirq.c
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-throttle.c
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c block: set the zone size in blk_revalidate_disk_zones atomically 2020-01-07 16:02:50 -08:00
blk.h block: fix memleak of bio integrity data 2020-01-26 10:01:09 +01:00
bounce.c BACKPORT: FROMLIST: Update Inline Encryption from v5 to v6 of patch series 2020-01-13 18:46:44 +00:00
bsg-lib.c block: Fix the type of 'sts' in bsg_queue_rq() 2020-01-23 08:22:44 +01:00
bsg.c
cmdline-parser.c
compat_ioctl.c compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES 2020-01-09 10:19:58 +01:00
elevator.c
genhd.c
ioctl.c block: simplify blkdev_nr_zones 2020-01-07 16:02:49 -08:00
ioprio.c
Kconfig ANDROID: modularize BLK_MQ_VIRTIO 2020-01-31 16:27:30 -08:00
Kconfig.iosched
keyslot-manager.c ANDROID: block: require drivers to declare supported crypto key type(s) 2020-04-07 17:58:49 +00:00
kyber-iosched.c
Makefile BACKPORT: FROMLIST: Update Inline Encryption from v5 to v6 of patch series 2020-01-13 18:46:44 +00:00
mq-deadline.c
opal_proto.h
partition-generic.c block: Remove partition support for zoned block devices 2020-01-07 16:02:46 -08:00
scsi_ioctl.c
sed-opal.c
t10-pi.c