lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250703014353.3366268-2-gongruiqi1@huawei.com>
Date: Thu, 3 Jul 2025 09:43:52 +0800
From: GONG Ruiqi <gongruiqi1@...wei.com>
To: Mimi Zohar <zohar@...ux.ibm.com>, Roberto Sassu
	<roberto.sassu@...wei.com>, Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
	Jarkko Sakkinen <jarkko@...nel.org>, Ard Biesheuvel <ardb@...nel.org>
CC: Eric Snowberg <eric.snowberg@...cle.com>, Paul Moore
	<paul@...l-moore.com>, James Morris <jmorris@...ei.org>, "Serge E . Hallyn"
	<serge@...lyn.com>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar
	<mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
	<dave.hansen@...ux.intel.com>, <x86@...nel.org>, "H . Peter Anvin"
	<hpa@...or.com>, <linux-kernel@...r.kernel.org>,
	<linux-integrity@...r.kernel.org>, <linux-security-module@...r.kernel.org>,
	<linux-efi@...r.kernel.org>, <keyrings@...r.kernel.org>, Lu Jialin
	<lujialin4@...wei.com>, <gongruiqi1@...wei.com>
Subject: [PATCH v3 1/2] x86/efi: Rename IMA-related function and macro of boot mode

Rename {__x86,arch}_ima_efi_boot_mode to .._integrity_efi_boot_mode, as
a preparing step for the next patch to decouple the functionality of
arch_ima_get_secureboot() from IMA.

No functional change intended.

Signed-off-by: GONG Ruiqi <gongruiqi1@...wei.com>
---
 arch/x86/include/asm/efi.h       | 4 ++--
 arch/x86/platform/efi/efi.c      | 2 +-
 security/integrity/ima/ima_efi.c | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index f227a70ac91f..fcac86a1327b 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -401,9 +401,9 @@ extern int __init efi_memmap_split_count(efi_memory_desc_t *md,
 extern void __init efi_memmap_insert(struct efi_memory_map *old_memmap,
 				     void *buf, struct efi_mem_range *mem);
 
-extern enum efi_secureboot_mode __x86_ima_efi_boot_mode(void);
+extern enum efi_secureboot_mode __x86_integrity_efi_boot_mode(void);
 
-#define arch_ima_efi_boot_mode	__x86_ima_efi_boot_mode()
+#define arch_integrity_efi_boot_mode	__x86_integrity_efi_boot_mode()
 
 #ifdef CONFIG_EFI_RUNTIME_MAP
 int efi_get_runtime_map_size(void);
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 463b784499a8..94704858f17a 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -921,7 +921,7 @@ umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n)
 	return attr->mode;
 }
 
-enum efi_secureboot_mode __x86_ima_efi_boot_mode(void)
+enum efi_secureboot_mode __x86_integrity_efi_boot_mode(void)
 {
 	return boot_params.secure_boot;
 }
diff --git a/security/integrity/ima/ima_efi.c b/security/integrity/ima/ima_efi.c
index 138029bfcce1..9f9c30dcde17 100644
--- a/security/integrity/ima/ima_efi.c
+++ b/security/integrity/ima/ima_efi.c
@@ -7,8 +7,8 @@
 #include <linux/ima.h>
 #include <asm/efi.h>
 
-#ifndef arch_ima_efi_boot_mode
-#define arch_ima_efi_boot_mode efi_secureboot_mode_unset
+#ifndef arch_integrity_efi_boot_mode
+#define arch_integrity_efi_boot_mode efi_secureboot_mode_unset
 #endif
 
 static enum efi_secureboot_mode get_sb_mode(void)
@@ -36,7 +36,7 @@ bool arch_ima_get_secureboot(void)
 	static bool initialized;
 
 	if (!initialized && efi_enabled(EFI_BOOT)) {
-		sb_mode = arch_ima_efi_boot_mode;
+		sb_mode = arch_integrity_efi_boot_mode;
 
 		if (sb_mode == efi_secureboot_mode_unset)
 			sb_mode = get_sb_mode();
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ