powerpc/pseries: Correct secvar format representation for static key management
authorSrish Srinivasan <ssrish@linux.ibm.com>
Tue, 10 Jun 2025 21:19:05 +0000 (02:49 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 9 Jul 2025 03:46:17 +0000 (09:16 +0530)
commitfbf355f32b98903c572544ead7fc0db79583c3a2
tree2dc36344173e25b0ca20f09d6a8c47ff30a64fca
parent760b9b4f6de9a33ca56a05f950cabe82138d25bd
powerpc/pseries: Correct secvar format representation for static key management

On a PLPKS enabled PowerVM LPAR, the secvar format property for static
key management is misrepresented as "ibm,plpks-sb-unknown", creating
reason for confusion.

Static key management mode uses fixed, built-in keys. Dynamic key
management mode allows keys to be updated in production to handle
security updates without firmware rebuilds.

Define a function named plpks_get_sb_keymgmt_mode() to retrieve the
key management mode based on the existence of the SB_VERSION property
in the firmware.

Set the secvar format property to either "ibm,plpks-sb-v<version>" or
"ibm,plpks-sb-v0" based on the key management mode, and return the
length of the secvar format property.

Co-developed-by: Souradeep <soura@imap.linux.ibm.com>
Signed-off-by: Souradeep <soura@imap.linux.ibm.com>
Signed-off-by: Srish Srinivasan <ssrish@linux.ibm.com>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Nayna Jain <nayna@linux.ibm.com>
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250610211907.101384-2-ssrish@linux.ibm.com
Documentation/ABI/testing/sysfs-secvar
arch/powerpc/platforms/pseries/plpks-secvar.c