All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] s390: Ultravisor device
@ 2022-02-23 14:48 Steffen Eiden
  2022-02-23 14:48 ` [PATCH v2 1/3] drivers/s390/char: Add Ultravisor io device Steffen Eiden
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Steffen Eiden @ 2022-02-23 14:48 UTC (permalink / raw)
  To: linux-s390
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	Alexander Gordeev, Janosch Frank, David Hildenbrand,
	Claudio Imbrenda, Shuah Khan, linux-kernel, kvm, linux-kselftest

This series adds an Ultravisor(UV) device letting the userspace send some
Ultravisor calls to the UV. Currently two calls are supported.
Query Ultravisor Information (QUI) and
Receive Attestation Measurement (Attest[ation]).

The UV device is implemented as a miscdevice accepting only IOCTLs.
The IOCTL cmd specifies the UV call and the IOCTL arg the request
and response data depending on the UV call.
The device driver writes the UV response in the ioctl argument data.

The 'uvdevice' does no checks on the request beside faulty userspace
addresses, if sizes are in a sane range before allocating in kernel space,
and other tests that prevent the system from corruption.
Especially, no checks are made, that will be performed by the UV anyway
(E.g. 'invalid command' in case of attestation on unsupported hardware).
These errors are reported back to Userspace using the UV return code
field.

The first two patches introduce the new device as a module configured to be
compiled directly into the kernel (y) similar to the s390 SCLP and CHSH
miscdevice modules. Patch 3/3 introduces selftests which verify error
paths of the ioctl.

v1->v2:
  * ioctl returns -ENOIOCTLCMD in case of a invalid ioctl command
  * streamlined reserved field test
  * default Kconfig is y instead of m
  * improved selftest documentation

Steffen Eiden (3):
  drivers/s390/char: Add Ultravisor io device
  drivers/s390/char: Add Ultravisor attestation to uvdevice
  selftests: drivers/s390x: Add uvdevice tests

 MAINTAINERS                                   |   3 +
 arch/s390/include/asm/uv.h                    |  23 +-
 arch/s390/include/uapi/asm/uvdevice.h         |  46 +++
 drivers/s390/char/Kconfig                     |  11 +
 drivers/s390/char/Makefile                    |   1 +
 drivers/s390/char/uvdevice.c                  | 308 ++++++++++++++++++
 tools/testing/selftests/Makefile              |   1 +
 tools/testing/selftests/drivers/.gitignore    |   1 +
 .../selftests/drivers/s390x/uvdevice/Makefile |  22 ++
 .../selftests/drivers/s390x/uvdevice/config   |   1 +
 .../drivers/s390x/uvdevice/test_uvdevice.c    | 281 ++++++++++++++++
 11 files changed, 697 insertions(+), 1 deletion(-)
 create mode 100644 arch/s390/include/uapi/asm/uvdevice.h
 create mode 100644 drivers/s390/char/uvdevice.c
 create mode 100644 tools/testing/selftests/drivers/s390x/uvdevice/Makefile
 create mode 100644 tools/testing/selftests/drivers/s390x/uvdevice/config
 create mode 100644 tools/testing/selftests/drivers/s390x/uvdevice/test_uvdevice.c

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-03-04 12:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 14:48 [PATCH v2 0/3] s390: Ultravisor device Steffen Eiden
2022-02-23 14:48 ` [PATCH v2 1/3] drivers/s390/char: Add Ultravisor io device Steffen Eiden
2022-02-23 15:57   ` Greg KH
2022-03-02 10:34   ` Janosch Frank
2022-03-02 10:46     ` Steffen Eiden
2022-03-03  9:53   ` Janosch Frank
2022-03-03 14:17   ` Janosch Frank
2022-02-23 14:48 ` [PATCH v2 2/3] drivers/s390/char: Add Ultravisor attestation to uvdevice Steffen Eiden
2022-03-03 14:44   ` Janosch Frank
2022-02-23 14:48 ` [PATCH v2 3/3] selftests: drivers/s390x: Add uvdevice tests Steffen Eiden
2022-03-04 12:11   ` Janosch Frank

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.