From nobody Wed Oct 8 00:58:42 2025 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41B6427A101; Fri, 4 Jul 2025 07:40:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751614836; cv=none; b=K0hht0MdYR8AB1SLo+BlLOxeLpx+0N1kotPX/3/BSW6QVLelm0F1sYZuJHeQey51zYJUTF0bgwf+mF9z+Do6aOvabhrcU6zbiqM9SUo0EYJTJRfTkPACYjXjpP/oQxgDntdX5VeMgtV38BxgkyIGftvYPnuNBOyMPJNa2tZ0JRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751614836; c=relaxed/simple; bh=DmKkm+5VZ+nxcvM9V0qn1OfuccxIXOhlkvGYD9U59sw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DUMyYa2a9hyZk9OqH0bbWpxXd3WGzwKCiv108nIEjpG5uAoSHAOx3I38i5EEe6N6XGVmMxB9Ky6GokaVrNpbk8tnyQo9Lrcz8dPX7DDoEo3dWDm/xTWz0v5N/pSUMKJW7DoP4rMjQuGAAIz1AXucAk/FaicRNORovHD0046uj5s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4bYQVS6KSxz2SSrM; Fri, 4 Jul 2025 15:38:40 +0800 (CST) Received: from kwepemg100016.china.huawei.com (unknown [7.202.181.57]) by mail.maildlp.com (Postfix) with ESMTPS id A11E71402CB; Fri, 4 Jul 2025 15:40:29 +0800 (CST) Received: from huawei.com (10.67.174.33) by kwepemg100016.china.huawei.com (7.202.181.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 4 Jul 2025 15:40:28 +0800 From: GONG Ruiqi To: Mimi Zohar , Roberto Sassu , Dmitry Kasatkin , Jarkko Sakkinen , Ard Biesheuvel CC: Eric Snowberg , Paul Moore , James Morris , "Serge E . Hallyn" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H . Peter Anvin" , , , , , , Lu Jialin , Subject: [PATCH v4 1/2] x86/efi: Rename IMA-related function and macro of boot mode Date: Fri, 4 Jul 2025 15:51:13 +0800 Message-ID: <20250704075114.3709609-2-gongruiqi1@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250704075114.3709609-1-gongruiqi1@huawei.com> References: <20250704075114.3709609-1-gongruiqi1@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemg100016.china.huawei.com (7.202.181.57) Content-Type: text/plain; charset="utf-8" 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 --- 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_des= c_t *md, extern void __init efi_memmap_insert(struct efi_memory_map *old_memmap, void *buf, struct efi_mem_range *mem); =20 -extern enum efi_secureboot_mode __x86_ima_efi_boot_mode(void); +extern enum efi_secureboot_mode __x86_integrity_efi_boot_mode(void); =20 -#define arch_ima_efi_boot_mode __x86_ima_efi_boot_mode() +#define arch_integrity_efi_boot_mode __x86_integrity_efi_boot_mode() =20 #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, struc= t attribute *attr, int n) return attr->mode; } =20 -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 #include =20 -#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 =20 static enum efi_secureboot_mode get_sb_mode(void) @@ -36,7 +36,7 @@ bool arch_ima_get_secureboot(void) static bool initialized; =20 if (!initialized && efi_enabled(EFI_BOOT)) { - sb_mode =3D arch_ima_efi_boot_mode; + sb_mode =3D arch_integrity_efi_boot_mode; =20 if (sb_mode =3D=3D efi_secureboot_mode_unset) sb_mode =3D get_sb_mode(); --=20 2.25.1