]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/pkey: Add new pkey handler module pkey-uv
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 25 Oct 2024 10:34:32 +0000 (12:34 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 29 Oct 2024 10:17:18 +0000 (11:17 +0100)
commit73dfc79c6b046af252a5d1b7b34a2f1454d6f7f3
tree6cc6be49d14fd8f37606e67ec10ca8c055bc5331
parenteb37a9aea64d1b3b2944679dc6b85b3bb84053cd
s390/pkey: Add new pkey handler module pkey-uv

This new pkey handler module supports the conversion of
Ultravisor retrievable secrets to protected keys.
The new module pkey-uv.ko is able to retrieve and verify
protected keys backed up by the Ultravisor layer which is
only available within protected execution environment.

The module is only automatically loaded if there is the
UV CPU feature flagged as available. Additionally on module
init there is a check for protected execution environment
and for UV supporting retrievable secrets. Also if the kernel
is not running as a protected execution guest, the module
unloads itself with errno ENODEV.

The pkey UV module currently supports these Ultravisor
secrets and is able to retrieve a protected key for these
UV secret types:
  - UV_SECRET_AES_128
  - UV_SECRET_AES_192
  - UV_SECRET_AES_256
  - UV_SECRET_AES_XTS_128
  - UV_SECRET_AES_XTS_256
  - UV_SECRET_HMAC_SHA_256
  - UV_SECRET_HMAC_SHA_512
  - UV_SECRET_ECDSA_P256
  - UV_SECRET_ECDSA_P384
  - UV_SECRET_ECDSA_P521
  - UV_SECRET_ECDSA_ED25519
  - UV_SECRET_ECDSA_ED448

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/configs/debug_defconfig
arch/s390/configs/defconfig
arch/s390/include/uapi/asm/pkey.h
drivers/crypto/Kconfig
drivers/s390/crypto/Makefile
drivers/s390/crypto/pkey_base.c
drivers/s390/crypto/pkey_uv.c [new file with mode: 0644]