summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/Kconfig
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2023-02-10 19:03:59 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2023-02-13 22:34:33 +1100
commitccadf154cb00b9ee9618d209aa3efc54b35a34b4 (patch)
tree8106d53ea05d80bb6cd2ef42de1467a5912e908b /arch/powerpc/platforms/pseries/Kconfig
parent91361b5175d2b3704f7e436d0071893c839e1199 (diff)
powerpc/pseries: Implement secvars for dynamic secure boot
The pseries platform can support dynamic secure boot (i.e. secure boot using user-defined keys) using variables contained with the PowerVM LPAR Platform KeyStore (PLPKS). Using the powerpc secvar API, expose the relevant variables for pseries dynamic secure boot through the existing secvar filesystem layout. The relevant variables for dynamic secure boot are signed in the keystore, and can only be modified using the H_PKS_SIGNED_UPDATE hcall. Object labels in the keystore are encoded using ucs2 format. With our fixed variable names we don't have to care about encoding outside of the necessary byte padding. When a user writes to a variable, the first 8 bytes of data must contain the signed update flags as defined by the hypervisor. When a user reads a variable, the first 4 bytes of data contain the policies defined for the object. Limitations exist due to the underlying implementation of sysfs binary attributes, as is the case for the OPAL secvar implementation - partial writes are unsupported and writes cannot be larger than PAGE_SIZE. (Even when using bin_attributes, which can be larger than a single page, sysfs only gives us one page's worth of write buffer at a time, and the hypervisor does not expose an interface for partial writes.) Co-developed-by: Nayna Jain <nayna@linux.ibm.com> Signed-off-by: Nayna Jain <nayna@linux.ibm.com> Co-developed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Russell Currey <ruscur@russell.cc> [mpe: Add NLS dependency to fix build errors, squash fix from ajd] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230210080401.345462-25-ajd@linux.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/pseries/Kconfig')
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index e51d65969318..b481c5c8bae1 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -151,6 +151,7 @@ config IBMEBUS
config PSERIES_PLPKS
depends on PPC_PSERIES
+ select NLS
bool
# PowerVM provides an isolated Platform Keystore (PKS) storage
# allocation for each LPAR with individually managed access