public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM/efi: Remove duplicate permission settings
@ 2025-10-23  8:21 Qiang Ma
  2025-10-23  8:21 ` [PATCH 2/2] efi/arm*: Remove the useless failure return message print Qiang Ma
  2025-10-23  8:30 ` [PATCH 1/2] ARM/efi: Remove duplicate permission settings Ard Biesheuvel
  0 siblings, 2 replies; 13+ messages in thread
From: Qiang Ma @ 2025-10-23  8:21 UTC (permalink / raw)
  To: ardb, linux; +Cc: linux-efi, linux-kernel, linux-arm-kernel, Qiang Ma

In the efi_virtmap_init(), permission settings have been applied:

static bool __init efi_virtmap_init(void)
{
	...
	for_each_efi_memory_desc(md)
		...
                efi_create_mapping(&efi_mm, md);
	...
	efi_memattr_apply_permissions(&efi_mm, efi_set_mapping_permissions);
	...
}

Therefore, there is no need to apply it again in the efi_create_mapping().

Fixes: 9fc68b717c24 ("ARM/efi: Apply strict permissions for UEFI Runtime Services regions")

Signed-off-by: Qiang Ma <maqianga@uniontech.com>
---
 arch/arm/kernel/efi.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/kernel/efi.c b/arch/arm/kernel/efi.c
index 6f9ec7d28a71..d2fca20d912e 100644
--- a/arch/arm/kernel/efi.c
+++ b/arch/arm/kernel/efi.c
@@ -70,11 +70,6 @@ int __init efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md)
 
 	create_mapping_late(mm, &desc, true);
 
-	/*
-	 * If stricter permissions were specified, apply them now.
-	 */
-	if (md->attribute & (EFI_MEMORY_RO | EFI_MEMORY_XP))
-		return efi_set_mapping_permissions(mm, md, false);
 	return 0;
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-10-30 10:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23  8:21 [PATCH 1/2] ARM/efi: Remove duplicate permission settings Qiang Ma
2025-10-23  8:21 ` [PATCH 2/2] efi/arm*: Remove the useless failure return message print Qiang Ma
2025-10-24  2:00   ` kernel test robot
2025-10-23  8:30 ` [PATCH 1/2] ARM/efi: Remove duplicate permission settings Ard Biesheuvel
2025-10-27  3:45   ` Qiang Ma
2025-10-28 13:42     ` Ard Biesheuvel
2025-10-29  9:54       ` Qiang Ma
2025-10-29 14:15         ` Ard Biesheuvel
2025-10-30  7:36           ` Qiang Ma
2025-10-30 10:02             ` Ard Biesheuvel
2025-10-30 10:24               ` Qiang Ma
2025-10-30 10:36                 ` Ard Biesheuvel
2025-10-30 10:44                   ` Qiang Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox