From nobody Fri Oct 18 06:17:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+101134+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101134+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1678727937; cv=none; d=zohomail.com; s=zohoarc; b=JDNw0R4Qz/uQ7DOXWdTFhU1KzjbTVsatGTbWllN4mjp4vspUIqqxec21SrLh/y+t8jYhyslkmbZBtmjuFsh8Q/CgFnSY/WggwULiC77PpiyhVkHO7ZL3utnnqJ2gN7iXN6Q4ZMv4od55A9aEra9W4lHIT6brS5R0hSHTII4Su5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678727937; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=a1g31OYKj1E3L4QT5m02FrWcnJBs4lAdX/lyWG+HqFU=; b=O49lMRA9klcU/0w2iUHNU/4DFxYw/Qbe957vvYSbMslEuqkhZvALus4WTw/IwAb+JWFOugKfrndo9eewSGPiaInFAqjmADWsgUKbdwIjBxetUFQcjYsB/UrR8XpLOVgwTpMl8RnuVT/+07yZ7x7zQzqTLBFPRJUj+fW7jOZ2Sn4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101134+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678727937020507.7095569282791; Mon, 13 Mar 2023 10:18:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7HiOYY1788612xvTaa8Af6Ut; Mon, 13 Mar 2023 10:18:56 -0700 X-Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.25825.1678727935644706118 for ; Mon, 13 Mar 2023 10:18:56 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1DFE6B811C1; Mon, 13 Mar 2023 17:18:54 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACC72C4339E; Mon, 13 Mar 2023 17:18:50 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Michael Kinney , Liming Gao , Jiewen Yao , Michael Kubacki , Sean Brogan , Rebecca Cran , Leif Lindholm , Sami Mujawar , Taylor Beebe Subject: [edk2-devel] [PATCH v5 30/38] MdePkg/IndustryStandard: PeImage.h: Import DLL characteristics Date: Mon, 13 Mar 2023 18:17:06 +0100 Message-Id: <20230313171714.3866151-31-ardb@kernel.org> In-Reply-To: <20230313171714.3866151-1-ardb@kernel.org> References: <20230313171714.3866151-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ardb@kernel.org X-Gm-Message-State: ygBBbqogcMH8dwPPhZwjixL6x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678727936; bh=F1UMMuSfGA3YVj2fdQ04yP22E1LOcuXCbvcAQm/2W7o=; h=Cc:Date:From:Reply-To:Subject:To; b=YV8bGKtnRfvOuXFeqXWBb0H8tSR1W5XbqwYKghh8xYnXIfp97Q2mvrG9FhfJuO7FbtF jSikcHvWmZPTiGubF5M3ZD65UG+SqYAN+HvdNmgXW+rqZQ4q2DGFP1HKMvXWk7OlomdBF r4x85RxaJvh3Sd6s7TMqWbOo2bKTyY5d3rM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678727938419100002 Content-Type: text/plain; charset="utf-8" Add the various symbolic constants that the PE/COFF spec v8.3 defines for the DllCharacteristics field of the PE optional header as preprocessor macros so we can test for them in C code. Signed-off-by: Ard Biesheuvel --- MdePkg/Include/IndustryStandard/PeImage.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/PeImage.h b/MdePkg/Include/Ind= ustryStandard/PeImage.h index dd4cc25483bc..f8d726b88353 100644 --- a/MdePkg/Include/IndustryStandard/PeImage.h +++ b/MdePkg/Include/IndustryStandard/PeImage.h @@ -108,6 +108,21 @@ typedef struct { #define EFI_IMAGE_FILE_DLL BIT13 ///< 0x2000 File is = a DLL. #define EFI_IMAGE_FILE_BYTES_REVERSED_HI BIT15 ///< 0x8000 Bytes of= machine word are reversed. =20 +/// +/// DLL Characteristics +/// +#define EFI_IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA BIT5 ///< 0x= 0020 Image can handle a high entropy 64-bit VA space. +#define EFI_IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE BIT6 ///< 0x= 0040 DLL can be relocated at load time. +#define EFI_IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY BIT7 ///< 0x= 0080 Code Integrity checks are enforced. +#define EFI_IMAGE_DLLCHARACTERISTICS_NX_COMPAT BIT8 ///< 0x= 0100 Image is NX compatible. +#define EFI_IMAGE_DLLCHARACTERISTICS_NO_ISOLATION BIT9 ///< 0x= 0200 Isolation aware, but do not isolate the image. +#define EFI_IMAGE_DLLCHARACTERISTICS_NO_SEH BIT10 ///< 0x= 0400 Does not use structured exception (SE) handling. +#define EFI_IMAGE_DLLCHARACTERISTICS_NO_BIND BIT11 ///< 0x= 0800 Do not bind the image. +#define EFI_IMAGE_DLLCHARACTERISTICS_APPCONTAINER BIT12 ///< 0x= 1000 Image must execute in an AppContainer. +#define EFI_IMAGE_DLLCHARACTERISTICS_WDM_DRIVER BIT13 ///< 0x= 2000 A WDM driver. +#define EFI_IMAGE_DLLCHARACTERISTICS_GUARD_CF BIT14 ///< 0x= 4000 Image supports Control Flow Guard. +#define EFI_IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE BIT15 ///< 0x= 8000 Terminal Server aware. + /// /// Header Data Directories. /// --=20 2.39.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101134): https://edk2.groups.io/g/devel/message/101134 Mute This Topic: https://groups.io/mt/97586047/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-