Skip to content

Commit 4944f66

Browse files
committed
Merge: Updates for powerpc security when system booted in secure boot mode
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/32 Description: powerpc: security: Lock down the kernel if booted in secure boot mode JIRA: https://issues.redhat.com/browse/RHEL-57024 Upstream Status: RHEL only Signed-off-by: Mamatha Inamdar <minamdar@redhat.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Jan Stancek <jstancek@redhat.com>
2 parents db1120b + 8ab8974 commit 4944f66

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

arch/powerpc/kernel/setup-common.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#include <linux/of_irq.h>
3636
#include <linux/hugetlb.h>
3737
#include <linux/pgtable.h>
38+
#include <linux/security.h>
39+
#include <asm/secure_boot.h>
3840
#include <asm/io.h>
3941
#include <asm/paca.h>
4042
#include <asm/processor.h>
@@ -921,7 +923,13 @@ void __init setup_arch(char **cmdline_p)
921923
* just cputable (on ppc32).
922924
*/
923925
initialize_cache_info();
924-
926+
/*
927+
* Lock down the kernel if booted in secure mode. This is required to
928+
* maintain kernel integrity.
929+
*/
930+
if(is_ppc_secureboot_enabled())
931+
security_lock_kernel_down("Power secure boot", LOCKDOWN_INTEGRITY_MAX);
932+
925933
/* Initialize RTAS if available. */
926934
rtas_initialize();
927935

0 commit comments

Comments
 (0)