Skip to content

Commit bde5b1a

Browse files
ssrish17maddy-kerneldev
authored andcommitted
integrity/platform_certs: Allow loading of keys in the static key management mode
On PLPKS enabled PowerVM LPAR, there is no provision to load signed third-party kernel modules when the key management mode is static. This is because keys from secure boot secvars are only loaded when the key management mode is dynamic. Allow loading of the trustedcadb and moduledb keys even in the static key management mode, where the secvar format string takes the form "ibm,plpks-sb-v0". Signed-off-by: Srish Srinivasan <[email protected]> Tested-by: R Nageswara Sastry <[email protected]> Reviewed-by: Mimi Zohar <[email protected]> Reviewed-by: Stefan Berger <[email protected]> Reviewed-by: Nayna Jain <[email protected]> Reviewed-by: Andrew Donnellan <[email protected]> Signed-off-by: Madhavan Srinivasan <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent c1d96cd commit bde5b1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

security/integrity/platform_certs/load_powerpc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ static int __init load_powerpc_certs(void)
7575
return -ENODEV;
7676

7777
// Check for known secure boot implementations from OPAL or PLPKS
78-
if (strcmp("ibm,edk2-compat-v1", buf) && strcmp("ibm,plpks-sb-v1", buf)) {
78+
if (strcmp("ibm,edk2-compat-v1", buf) && strcmp("ibm,plpks-sb-v1", buf) &&
79+
strcmp("ibm,plpks-sb-v0", buf)) {
7980
pr_err("Unsupported secvar implementation \"%s\", not loading certs\n", buf);
8081
return -ENODEV;
8182
}
8283

83-
if (strcmp("ibm,plpks-sb-v1", buf) == 0)
84+
if (strcmp("ibm,plpks-sb-v1", buf) == 0 || strcmp("ibm,plpks-sb-v0", buf) == 0)
8485
/* PLPKS authenticated variables ESL data is prefixed with 8 bytes of timestamp */
8586
offset = 8;
8687

0 commit comments

Comments
 (0)