From: "tip-bot2 for Heiner Kallweit" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Ard Biesheuvel <ardb@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: efi/urgent] efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared
Date: Sun, 23 May 2021 09:47:00 -0000 [thread overview]
Message-ID: <162176322031.29796.11878288049256642429.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the efi/urgent branch of tip:
Commit-ID: 45add3cc99feaaf57d4b6f01d52d532c16a1caee
Gitweb: https://git.kernel.org/tip/45add3cc99feaaf57d4b6f01d52d532c16a1caee
Author: Heiner Kallweit <hkallweit1@gmail.com>
AuthorDate: Fri, 30 Apr 2021 16:22:51 +02:00
Committer: Ard Biesheuvel <ardb@kernel.org>
CommitterDate: Sat, 22 May 2021 14:05:13 +02:00
efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared
UEFI spec 2.9, p.108, table 4-1 lists the scenario that both attributes
are cleared with the description "No memory access protection is
possible for Entry". So we can have valid entries where both attributes
are cleared, so remove the check.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Fixes: 10f0d2f577053 ("efi: Implement generic support for the Memory Attributes table")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
drivers/firmware/efi/memattr.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c
index 5737cb0..0a9aba5 100644
--- a/drivers/firmware/efi/memattr.c
+++ b/drivers/firmware/efi/memattr.c
@@ -67,11 +67,6 @@ static bool entry_is_valid(const efi_memory_desc_t *in, efi_memory_desc_t *out)
return false;
}
- if (!(in->attribute & (EFI_MEMORY_RO | EFI_MEMORY_XP))) {
- pr_warn("Entry attributes invalid: RO and XP bits both cleared\n");
- return false;
- }
-
if (PAGE_SIZE > EFI_PAGE_SIZE &&
(!PAGE_ALIGNED(in->phys_addr) ||
!PAGE_ALIGNED(in->num_pages << EFI_PAGE_SHIFT))) {
reply other threads:[~2021-05-23 9:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=162176322031.29796.11878288049256642429.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=ardb@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=x86@kernel.org \
/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®