summaryrefslogtreecommitdiff
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorCoiby Xu <coxu@redhat.com>2026-02-13 09:28:46 +0800
committerMimi Zohar <zohar@linux.ibm.com>2026-03-05 11:10:08 -0500
commit31a6a07eefeb4c84bd6730fbe9e95fd9221712cf (patch)
tree0e50de52df88419fa0f8005afa1109cb24fe5eec /arch/s390/kernel
parent11439c4635edd669ae435eec308f4ab8a0804808 (diff)
downloadlwn-31a6a07eefeb4c84bd6730fbe9e95fd9221712cf.tar.gz
lwn-31a6a07eefeb4c84bd6730fbe9e95fd9221712cf.zip
integrity: Make arch_ima_get_secureboot integrity-wide
EVM and other LSMs need the ability to query the secure boot status of the system, without directly calling the IMA arch_ima_get_secureboot function. Refactor the secure boot status check into a general function named arch_get_secureboot. Reported-and-suggested-by: Mimi Zohar <zohar@linux.ibm.com> Suggested-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Coiby Xu <coxu@redhat.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/ima_arch.c6
-rw-r--r--arch/s390/kernel/ipl.c5
2 files changed, 5 insertions, 6 deletions
diff --git a/arch/s390/kernel/ima_arch.c b/arch/s390/kernel/ima_arch.c
index f3c3e6e1c5d3..6ccbe34ce408 100644
--- a/arch/s390/kernel/ima_arch.c
+++ b/arch/s390/kernel/ima_arch.c
@@ -1,12 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/ima.h>
-#include <asm/boot_data.h>
-
-bool arch_ima_get_secureboot(void)
-{
- return ipl_secure_flag;
-}
const char * const *arch_get_ima_policy(void)
{
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 049c557c452f..bdbbedf52580 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -2504,6 +2504,11 @@ out:
return buf;
}
+bool arch_get_secureboot(void)
+{
+ return ipl_secure_flag;
+}
+
int ipl_report_free(struct ipl_report *report)
{
struct ipl_report_component *comp, *ncomp;