aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi
diff options
context:
space:
mode:
authorRussell Currey <[email protected]>2023-02-10 19:03:59 +1100
committerMichael Ellerman <[email protected]>2023-02-13 22:34:33 +1100
commitccadf154cb00b9ee9618d209aa3efc54b35a34b4 (patch)
tree8106d53ea05d80bb6cd2ef42de1467a5912e908b /lib/mpi
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 <[email protected]> Signed-off-by: Nayna Jain <[email protected]> Co-developed-by: Andrew Donnellan <[email protected]> Signed-off-by: Andrew Donnellan <[email protected]> Signed-off-by: Russell Currey <[email protected]> [mpe: Add NLS dependency to fix build errors, squash fix from ajd] Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/mpi')
0 files changed, 0 insertions, 0 deletions