All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] pseries dynamic secure boot interface using secvar
@ 2022-12-30  4:20 ` Russell Currey
  0 siblings, 0 replies; 54+ messages in thread
From: Russell Currey @ 2022-12-30  4:20 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: gregkh, gcwilson, linux-kernel, nayna, ajd, zohar, mpe, Russell Currey

Changes in v2:

    Remove unnecessary config vars from sysfs and document the others,
    thanks to review from Greg.  If we end up needing to expose more, we
    can add them later and update the docs.

    Use sysfs_emit() instead of sprintf() for all sysfs strings

    Change the size of the sysfs binary attributes to include the 8-byte
    flags header, preventing truncation of large writes.

This series exposes an interface to userspace for reading and writing
secure variables contained within the PowerVM LPAR Platform KeyStore
(PLPKS) for the purpose of configuring dynamic secure boot.

This series builds on past work by Nayna Jain[0] in exposing PLPKS
variables to userspace.  Rather than being a generic interface for
interacting with the keystore, however, we use the existing powerpc
secvar infrastructure to only expose objects in the keystore used
for dynamic secure boot.  This has the benefit of leveraging an
existing interface and making the implementation relatively minimal.

This series needs to be applied on top of Andrew's recent bugfix
series[1].

There are a few relevant details to note about the implementation:

 * New additions to the secvar API, format() and max_size()
 * New optional sysfs directory "config/" for arbitrary ASCII variables
 * Some OPAL-specific code has been relocated from secvar-sysfs.c to
	powernv platform code.  Would appreciate any powernv testing!
 * Variable names are fixed and only those used for secure boot are
 	exposed.  This is not a generic PLPKS interface, but also
	doesn't preclude one being added in future.

With this series, both powernv and pseries platforms support dynamic
secure boot through the same interface.

[0]: https://lore.kernel.org/linuxppc-dev/20221106210744.603240-1-nayna@linux.ibm.com/
[1]: https://lore.kernel.org/linuxppc-dev/20221220071626.1426786-1-ajd@linux.ibm.com/

v1: https://lore.kernel.org/linuxppc-dev/20221228072943.429266-1-ruscur@russell.cc/

Russell Currey (7):
  powerpc/pseries: Log hcall return codes for PLPKS debug
  powerpc/secvar: WARN_ON_ONCE() if multiple secvar ops are set
  powerpc/secvar: Use sysfs_emit() instead of sprintf()
  powerpc/secvar: Handle format string in the consumer
  powerpc/secvar: Handle max object size in the consumer
  powerpc/secvar: Extend sysfs to include config vars
  powerpc/pseries: Implement secvars for dynamic secure boot

 Documentation/ABI/testing/sysfs-secvar        |  67 ++++-
 arch/powerpc/include/asm/secvar.h             |   5 +
 arch/powerpc/kernel/secvar-ops.c              |   4 +-
 arch/powerpc/kernel/secvar-sysfs.c            |  78 +++---
 arch/powerpc/platforms/powernv/opal-secvar.c  |  44 ++++
 arch/powerpc/platforms/pseries/Kconfig        |  13 +
 arch/powerpc/platforms/pseries/Makefile       |   4 +-
 arch/powerpc/platforms/pseries/plpks-secvar.c | 245 ++++++++++++++++++
 arch/powerpc/platforms/pseries/plpks.c        |   2 +
 9 files changed, 419 insertions(+), 43 deletions(-)
 create mode 100644 arch/powerpc/platforms/pseries/plpks-secvar.c

-- 
2.38.1


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

end of thread, other threads:[~2023-01-11  3:58 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-30  4:20 [PATCH v2 0/7] pseries dynamic secure boot interface using secvar Russell Currey
2022-12-30  4:20 ` Russell Currey
2022-12-30  4:20 ` [PATCH v2 1/7] powerpc/pseries: Log hcall return codes for PLPKS debug Russell Currey
2022-12-30  4:20   ` Russell Currey
2023-01-04  4:45   ` Andrew Donnellan
2023-01-04  4:45     ` Andrew Donnellan
2022-12-30  4:20 ` [PATCH v2 2/7] powerpc/secvar: WARN_ON_ONCE() if multiple secvar ops are set Russell Currey
2022-12-30  4:20   ` Russell Currey
2023-01-04  7:10   ` Andrew Donnellan
2023-01-04  7:10     ` Andrew Donnellan
2022-12-30  4:20 ` [PATCH v2 3/7] powerpc/secvar: Use sysfs_emit() instead of sprintf() Russell Currey
2022-12-30  4:20   ` Russell Currey
2023-01-04  7:12   ` Andrew Donnellan
2023-01-04  7:12     ` Andrew Donnellan
2022-12-30  4:20 ` [PATCH v2 4/7] powerpc/secvar: Handle format string in the consumer Russell Currey
2022-12-30  4:20   ` Russell Currey
2023-01-04  7:31   ` Andrew Donnellan
2023-01-04  7:31     ` Andrew Donnellan
2022-12-30  4:20 ` [PATCH v2 5/7] powerpc/secvar: Handle max object size " Russell Currey
2022-12-30  4:20   ` Russell Currey
2023-01-04  7:50   ` Andrew Donnellan
2023-01-04  7:50     ` Andrew Donnellan
2022-12-30  4:20 ` [PATCH v2 6/7] powerpc/secvar: Extend sysfs to include config vars Russell Currey
2022-12-30  4:20   ` Russell Currey
2023-01-05  7:28   ` Andrew Donnellan
2023-01-05  7:28     ` Andrew Donnellan
2023-01-06  6:33     ` Russell Currey
2023-01-06  6:33       ` Russell Currey
2023-01-06  4:15   ` Michael Ellerman
2023-01-06  4:15     ` Michael Ellerman
2023-01-06  6:35     ` Russell Currey
2023-01-06  6:35       ` Russell Currey
2022-12-30  4:20 ` [PATCH v2 7/7] powerpc/pseries: Implement secvars for dynamic secure boot Russell Currey
2022-12-30  4:20   ` Russell Currey
2023-01-05  8:15   ` Andrew Donnellan
2023-01-05  8:15     ` Andrew Donnellan
2023-01-06  6:49     ` Russell Currey
2023-01-06  6:49       ` Russell Currey
2023-01-09  4:42       ` Andrew Donnellan
2023-01-09  4:42         ` Andrew Donnellan
2023-01-06 10:49   ` Michael Ellerman
2023-01-06 10:49     ` Michael Ellerman
2023-01-09  3:33     ` Andrew Donnellan
2023-01-09  3:33       ` Andrew Donnellan
2023-01-09  3:34     ` Russell Currey
2023-01-09  3:34       ` Russell Currey
2023-01-09  5:20       ` Andrew Donnellan
2023-01-09  5:20         ` Andrew Donnellan
2023-01-10  1:27         ` Russell Currey
2023-01-10  1:27           ` Russell Currey
2023-01-10  3:59     ` Andrew Donnellan
2023-01-10  3:59       ` Andrew Donnellan
2023-01-11  3:57     ` Andrew Donnellan
2023-01-11  3:57       ` Andrew Donnellan

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.