Skip to content

Commit 26776d2

Browse files
author
Mamatha Inamdar
committed
integrity/platform_certs: Allow loading of keys in the static key management mode
JIRA: https://issues.redhat.com/browse/RHEL-101962 commit bde5b1a Author: Srish Srinivasan <ssrish@linux.ibm.com> Date: Wed Jun 11 02:49:07 2025 +0530 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 <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-4-ssrish@linux.ibm.com Signed-off-by: Mamatha Inamdar <minamdar@redhat.com>
1 parent 3e7b609 commit 26776d2

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)