[PATCH v5 0/6] s390/uv: Retrieve Secrets Ultravisor Call support

Steffen Eiden posted 6 patches 1 month ago
arch/s390/boot/uv.c                   |   7 +-
arch/s390/include/asm/uv.h            | 147 +++++++++++++++++++++++-
arch/s390/include/uapi/asm/uvdevice.h |  36 +++---
arch/s390/kernel/uv.c                 | 153 ++++++++++++++++++++++++-
drivers/s390/char/uvdevice.c          | 156 +++++++++++++++++++++-----
5 files changed, 445 insertions(+), 54 deletions(-)
[PATCH v5 0/6] s390/uv: Retrieve Secrets Ultravisor Call support
Posted by Steffen Eiden 1 month ago
A new secret type (group) allows SE-guests to retrieve the secret value
from the UV secret store. All retrieved secrets (but plaintext) are
retrieved as a PCMKO-wrapped key so that they will never appear in
plaintext in the secure guest. Supported key/secret types are:
AES, AES-XTS, HMAC, and EC. Add support for an in-kernel API and an UAPI
to retrieve a previously added secret. If the hardware supports it,
adding secrets works with the same infrastructure that is used by
associate secrets introduced with AP-pass-through support.

With this addition List Secret UVCs can report more-data now and may
expect a starting index different to zero. This requires the addition of
LIST_SECRET_EXT IOCTL that works the same as the non_EXT variant but
additionally accepts an index (u16) as input.

Sinve v4:
	* add r-b by Christoph
	* use struct uv_secret_list for uv_list_secret()
	* pack all new uvcb related structs

Since v3:
	* converted an accidental kernel-doc-comment to a normal
	  comment.

Since v2:
	* Simplify conditionals
	* Fix documentation issues
	* Simplify list_secrets()
	* Add r-b from Christoph

Since v1:
	* Add various r-b's
	* Fix nits and minor issues

Steffen Eiden (6):
  s390/boot/uv.c: Use a constant for more-data rc
  s390/uv: Retrieve UV secrets support
  s390/uvdevice: Add Retrieve Secret IOCTL
  s390/uvdevice: Increase indent in IOCTL definitions
  s390/uvdevice: Add List Secrets Ext IOCTL
  s390/uv: Retrieve UV secrets sysfs support

 arch/s390/boot/uv.c                   |   7 +-
 arch/s390/include/asm/uv.h            | 147 +++++++++++++++++++++++-
 arch/s390/include/uapi/asm/uvdevice.h |  36 +++---
 arch/s390/kernel/uv.c                 | 153 ++++++++++++++++++++++++-
 drivers/s390/char/uvdevice.c          | 156 +++++++++++++++++++++-----
 5 files changed, 445 insertions(+), 54 deletions(-)

-- 
2.45.2
Re: [PATCH v5 0/6] s390/uv: Retrieve Secrets Ultravisor Call support
Posted by Janosch Frank 3 weeks, 6 days ago
On 10/24/24 8:26 AM, Steffen Eiden wrote:
> A new secret type (group) allows SE-guests to retrieve the secret value
> from the UV secret store. All retrieved secrets (but plaintext) are
> retrieved as a PCMKO-wrapped key so that they will never appear in
> plaintext in the secure guest. Supported key/secret types are:
> AES, AES-XTS, HMAC, and EC. Add support for an in-kernel API and an UAPI
> to retrieve a previously added secret. If the hardware supports it,
> adding secrets works with the same infrastructure that is used by
> associate secrets introduced with AP-pass-through support.
> 

I've picked up everything but patch #5 a couple of days ago.

Also these patches will go through the s390 tree and not through KVM 390 
as the crypto team has a series that's based on this one.