From: Qiang Ma <maqianga@uniontech.com>
To: ardb@kernel.org, linux@armlinux.org.uk
Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Qiang Ma <maqianga@uniontech.com>
Subject: [PATCH 1/2] ARM/efi: Remove duplicate permission settings
Date: Thu, 23 Oct 2025 16:21:28 +0800 [thread overview]
Message-ID: <20251023082129.75612-1-maqianga@uniontech.com> (raw)
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
next reply other threads:[~2025-10-23 8:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 8:21 Qiang Ma [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251023082129.75612-1-maqianga@uniontech.com \
--to=maqianga@uniontech.com \
--cc=ardb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®