linux/include
Eric Biggers c26f08d1d4 ANDROID: block: add basic hardware-wrapped key support
To prevent keys from being compromised if an attacker acquires read
access to kernel memory, some inline encryption hardware can accept keys
which are wrapped by a per-boot hardware-internal key.  This avoids
needing to keep the plaintext keys in kernel memory, without restricting
the number of keys that can be used.  Such keys can be initially
generated either by software (in which case they must be imported to
hardware to be wrapped) or directly by the hardware.  There is also a
mechanism to derive a "software secret" for cryptographic tasks that
can't be handled by inline encryption.

To support this hardware, allow struct blk_crypto_key to represent a
hardware-wrapped key as an alternative to a standard key, and make
drivers set flags in struct blk_crypto_profile to indicate which types
of keys they support.  Also add the derive_sw_secret() low-level
operation, which drivers supporting wrapped keys must implement.

For more information, see the detailed documentation which this patch
adds to Documentation/block/inline-encryption.rst.

This is a reworked version of a patch which was temporily reverted by
https://android-review.googlesource.com/c/kernel/common/+/1867367, and
which originated from several ANDROID patches that were consolidated by
https://android-review.googlesource.com/c/kernel/common-patches/+/1350782.
This version of the patch matches the patch in the below "Link:" tag
that was sent upstream as an RFC.  However, due to its history as
ANDROID, it remains tagged as ANDROID rather than FROMLIST.

Bug: 160883801
Link: https://lore.kernel.org/r/20211021181608.54127-2-ebiggers@kernel.org
Change-Id: I4d18c261c279d606457b33374234c0a037e1d45a
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-11-04 12:24:11 -07:00
..
acpi ACPI: tools: fix compilation error 2021-10-07 19:18:19 +02:00
asm-generic Memory folios 2021-11-01 08:47:59 -07:00
clocksource
crypto
drm
dt-bindings
keys
kunit kunit: fix kernel-doc warnings due to mismatched arg names 2021-10-06 17:54:07 -06:00
kvm
linux ANDROID: block: add basic hardware-wrapped key support 2021-11-04 12:24:11 -07:00
math-emu
media
memory
misc
net Linux 5.15 2021-11-01 07:40:54 +01:00
pcmcia
ras
rdma
scsi scsi: add a scsi_alloc_request helper 2021-10-22 08:33:57 -06:00
soc net: dsa: tag_ocelot_8021q: break circular dependency with ocelot switch lib 2021-10-12 17:35:18 -07:00
sound Merge 304040fb49 ("Merge tag 's390-5.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux") into android-mainline 2021-10-17 09:47:10 +02:00
target
trace Revert "ANDROID: futex: Add vendor hook for wait queue" 2021-11-03 14:11:33 +01:00
uapi Merge 595b28fb0c ("Merge tag 'locking-core-2021-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline 2021-11-04 08:28:52 +01:00
vdso
video
xen xen/privcmd: drop "pages" parameter from xen_remap_pfn() 2021-10-05 08:20:27 +02:00
OWNERS