From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Achin Gupta <achin.gupta@arm.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
Leif Lindholm <leif.lindholm@linaro.org>,
Jagadeesh Ujja <jagadeesh.ujja@arm.com>,
Thomas Panakamattam Abraham <thomas.abraham@arm.com>,
Sami Mujawar <Sami.Mujawar@arm.com>
Subject: [PATCH 5/8] StandaloneMmPkg/StandaloneMmPeCoffExtraActionLib: ignore runtime attribute
Date: Fri, 4 Jan 2019 12:03:12 +0100 [thread overview]
Message-ID: <20190104110315.18339-6-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20190104110315.18339-1-ard.biesheuvel@linaro.org>
The special handling of the EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER
attribute is only necessary for images that are relocated twice, i.e.,
in the context of SetVirtualAddressMap (). This does not apply to
standalone MM modules, so drop the check.
Drop some redundant DEBUG output while at it.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c b/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c
index 1c9fec201916..f6bfcc875751 100644
--- a/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c
+++ b/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c
@@ -145,8 +145,7 @@ UpdatePeCoffPermissions (
if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_EXECUTE) == 0) {
- if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_WRITE) == 0 &&
- TmpContext.ImageType != EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER) {
+ if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_WRITE) == 0) {
DEBUG ((DEBUG_INFO,
"%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n",
@@ -158,14 +157,10 @@ UpdatePeCoffPermissions (
__FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));
}
} else {
- DEBUG ((DEBUG_INFO,
- "%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n",
- __FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));
- ReadOnlyUpdater (Base, SectionHeader.Misc.VirtualSize);
-
DEBUG ((DEBUG_INFO,
"%a: Mapping section %d of image at 0x%lx with RO-X permissions and size 0x%x\n",
__FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));
+ ReadOnlyUpdater (Base, SectionHeader.Misc.VirtualSize);
NoExecUpdater (Base, SectionHeader.Misc.VirtualSize);
}
--
2.17.1
next prev parent reply other threads:[~2019-01-04 11:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-04 11:03 [PATCH 0/8] StandaloneMmPkg: assorted fixes and improvements Ard Biesheuvel
2019-01-04 11:03 ` [PATCH 1/8] StandaloneMmPkg/StandaloneMmCpu: fix typo Standlone -> Standalone Ard Biesheuvel
2019-01-04 17:48 ` Supreeth Venkatesh
2019-01-04 11:03 ` [PATCH 2/8] StandaloneMmPkg/StandaloneMmCoreEntryPoint: add missing SerialPortLib ref Ard Biesheuvel
2019-01-04 17:49 ` Supreeth Venkatesh
2019-01-04 11:03 ` [PATCH 3/8] StandaloneMmPkg/StandaloneMmCoreEntryPoint: use %a modifier for ASCII strings Ard Biesheuvel
2019-01-04 17:51 ` Supreeth Venkatesh
2019-01-04 11:03 ` [PATCH 4/8] StandaloneMmPkg/StandaloneMmCoreEntryPoint: remove bogus ASSERT_EFI_ERROR()s Ard Biesheuvel
2019-01-04 17:52 ` Supreeth Venkatesh
2019-01-04 11:03 ` Ard Biesheuvel [this message]
2019-01-04 11:03 ` [PATCH 6/8] StandaloneMmPkg/Core/Dispatcher: don't copy dispatched image twice Ard Biesheuvel
2019-01-04 11:03 ` [PATCH 7/8] StandaloneMmPkg/StandaloneMmCoreEntryPoint: permit the use of TE images Ard Biesheuvel
2019-01-04 11:03 ` [PATCH 8/8] StandaloneMmPkg/Core: permit encapsulated firmware volumes Ard Biesheuvel
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-list 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=20190104110315.18339-6-ard.biesheuvel@linaro.org \
--to=devel@edk2.groups.io \
/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