summaryrefslogtreecommitdiff
path: root/include/linux/secure_boot.h
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 /include/linux/secure_boot.h
parent11439c4635edd669ae435eec308f4ab8a0804808 (diff)
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 'include/linux/secure_boot.h')
-rw-r--r--include/linux/secure_boot.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/secure_boot.h b/include/linux/secure_boot.h
new file mode 100644
index 000000000000..3ded3f03655c
--- /dev/null
+++ b/include/linux/secure_boot.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2026 Red Hat, Inc. All Rights Reserved.
+ *
+ * Author: Coiby Xu <coxu@redhat.com>
+ */
+
+#ifndef _LINUX_SECURE_BOOT_H
+#define _LINUX_SECURE_BOOT_H
+
+#include <linux/types.h>
+
+/*
+ * Returns true if the platform secure boot is enabled.
+ * Returns false if disabled or not supported.
+ */
+bool arch_get_secureboot(void);
+
+#endif /* _LINUX_SECURE_BOOT_H */