From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web11.1737.1687902151649450989 for ; Tue, 27 Jun 2023 14:42:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SLvdf4JW; spf=pass (domain: gmail.com, ip: 209.85.216.52, mailfrom: joey.vagedes@gmail.com) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-262e3c597b9so2367071a91.0 for ; Tue, 27 Jun 2023 14:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687902151; x=1690494151; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jJaEos7MV46sV9qgzyiC7EEy6VjM4bgyzA4b3+SCjLs=; b=SLvdf4JWeMIvJHgpI3W848TPswt+3EoXaJB8rc6nWCiv6Wm8PNvSZPJIFBXHGN3tb2 jrTCvwQv+qVKKqF1Lst/rfIDXtqbnS+ov2RmoGmqbV4FVMdoP1er9wPTQ81RE2bZWyVh JCItfq78trOMzsZNf68raIZJ9wBzRgShpeTrQH+mZoVWuqo4T9kJhQ5w9v6CVhOGJyDG LMyeC8io6Fdg/E9ZUlnHs6ifL7EVAbsAd0rzi6BnbWgzWhxlyIl0LLfxAurJ2Jm279Y6 LT/3DVPI6Ynl34X/lBZ04riBsGwut4eXeH52ZLjhOEacZ+cGQ3jxGiYF5QkWucqlF1KM EkOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687902151; x=1690494151; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jJaEos7MV46sV9qgzyiC7EEy6VjM4bgyzA4b3+SCjLs=; b=lm+F9tLE0tkfEw9YSJ0L/CemRFdnS9XXOD0geZlsQr1GJ/4VoSYJ+H41BSg84dQeW+ 49TmYfybaNtK+OWslwy/DUKw6AVDKgy16JOlW9KIWwWKtuZWzW5AVz5QwtcPffg/CILd 8NqKUD5m1MZi9wftBMaGV72cUo0y1VfsYAEEjE+V3LYCljewt15M63pHCxXHE9CLF5/n dgHDGs6KR9rYQBFWc5S5k1tarkEP1oBWM2Z80liZPVAQznQDLaC5P6q2PDVb5dq4zX6o tunl1cd2PEfS9ddBYW6jP8Hll6ZmAgWtYGLas/IOJ5gtdGufC8NtxgbW63C29LHnUmbt TyJA== X-Gm-Message-State: AC+VfDzRQbhhPCKFxKVqI+3sK8CYIJAIX2m8NeANXbMniC/sO5oW1shk 8ETehgVC2djbDyqqmvwJZhfTt3lpLfSBCNf2aS4= X-Google-Smtp-Source: ACHHUZ6Z6ELo3ePclosHxwduAI2PX6Qsst7zJjNbnp4BWwTuVlDjdY5w7XT7gEx5SXYNz2QMuTqensClQVzlmlBIsLs= X-Received: by 2002:a17:90a:188:b0:262:c9f4:141 with SMTP id 8-20020a17090a018800b00262c9f40141mr9523299pjc.42.1687902150975; Tue, 27 Jun 2023 14:42:30 -0700 (PDT) MIME-Version: 1.0 References: <20230623154442.799-1-joey.vagedes@gmail.com> <20230623154442.799-2-joey.vagedes@gmail.com> In-Reply-To: From: Joey Vagedes Date: Tue, 27 Jun 2023 14:42:17 -0700 Message-ID: Subject: Re: [PATCH v1 1/2] MdePkg: IndustryStandard: Add DLL Characteristics To: "Kinney, Michael D" Cc: "devel@edk2.groups.io" , "Gao, Liming" , "Liu, Zhiguang" Content-Type: multipart/alternative; boundary="0000000000001fe7b905ff235884" --0000000000001fe7b905ff235884 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Michael, PeImage.h currently references rev 8.3 as the latest revision. The DLLCHARACTERISTICS field of the optional header existed in the revision, but I believe it was never added as it was not needed. I'm happy to add information to the header if needed, just let me know what you're looking for. Would you like me to update it to v9.3 or stay at v8.3? If we stay at 8.3, I will need to remove IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA as it did not exist in v8.3. as for the naming, The latest revision (9.3) of the spec has the name as IMAGE_DLLCHARACTERISTICS_*. In revision 8.3, this is also true, except for the first three entries which do include the space as you mentioned. Please let me know if you would like to stay at v8.3 or move up to v9.3 and I will update these defines appropriately. On Tue, Jun 27, 2023 at 1:12=E2=80=AFPM Kinney, Michael D < michael.d.kinney@intel.com> wrote: > Hi Joey, > > Was the link to the PE/COFF specs that added these updated in the file > header? > > Also, shouldn't it be DLL_CHARACTERISRICS instead of DLLCHARACTERISRICS? > > Mike > > > -----Original Message----- > > From: Joey Vagedes > > Sent: Friday, June 23, 2023 8:45 AM > > To: devel@edk2.groups.io > > Cc: Kinney, Michael D ; Gao, Liming > > ; Liu, Zhiguang > > Subject: [PATCH v1 1/2] MdePkg: IndustryStandard: Add DLL Characteristi= cs > > > > Add the bit masks for DLL Characteristics, used within the optional > > header of a PE, to the PeImage.h header file. > > > > Cc: Michael D Kinney > > Cc: Liming Gao > > Cc: Zhiguang Liu > > Signed-off-by: Joey Vagedes > > --- > > MdePkg/Include/IndustryStandard/PeImage.h | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > > > diff --git a/MdePkg/Include/IndustryStandard/PeImage.h > > b/MdePkg/Include/IndustryStandard/PeImage.h > > index 47037049348c..430e8988f550 100644 > > --- a/MdePkg/Include/IndustryStandard/PeImage.h > > +++ b/MdePkg/Include/IndustryStandard/PeImage.h > > @@ -269,6 +269,21 @@ typedef struct { > > #define EFI_IMAGE_SUBSYSTEM_OS2_CUI 5 > > #define EFI_IMAGE_SUBSYSTEM_POSIX_CUI 7 > > > > +// > > +// DLL Characteristics > > +// > > +#define IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA 0x0020 > > +#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE 0x0040 > > +#define IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY 0x0080 > > +#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100 > > +#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200 > > +#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400 > > +#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800 > > +#define IMAGE_DLLCHARACTERISTICS_APPCONTAINER 0x1000 > > +#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 > > +#define IMAGE_DLLCHARACTERISTICS_GUARD_CF 0x4000 > > +#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000 > > + > > /// > > /// Length of ShortName. > > /// > > -- > > 2.41.0.windows.1 > > --0000000000001fe7b905ff235884 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Michael,

PeImage.h currently referen= ces rev 8.3 as the latest revision. The DLLCHARACTERISTICS field of the opt= ional header existed in the revision, but I believe it was never added as i= t was not needed. I'm happy to add information to the header if needed,= just let me know what you're looking for. Would you like me to update = it to v9.3 or stay at v8.3? If we stay at 8.3, I will need to remove=C2=A0 IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA as it did not exist in v8.3.
as for the naming, The latest revision (9.3) of the spec has the name as = IMAGE_DLLCHARACTERISTICS_*. In revision 8.3, this is also true, except for = the first three entries which do include the space as you mentioned.
Please let me know if you would like to stay at v8.3 or move up to v9.3 an= d I will update these defines appropriately.

On Tue, Jun 27, 2023 at 1= :12=E2=80=AFPM Kinney, Michael D <michael.d.kinney@intel.com> wrote:
Hi Joey,

Was the link to the PE/COFF specs that added these updated in the file head= er?

Also, shouldn't it be DLL_CHARACTERISRICS instead of DLLCHARACTERISRICS= ?

Mike

> -----Original Message-----
> From: Joey Vagedes <joey.vagedes@gmail.com>
> Sent: Friday, June 23, 2023 8:45 AM
> To: devel@ed= k2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> <gaol= iming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>
> Subject: [PATCH v1 1/2] MdePkg: IndustryStandard: Add DLL Characterist= ics
>
> Add the bit masks for DLL Characteristics, used within the optional > header of a PE, to the PeImage.h header file.
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com>
> ---
>=C2=A0 MdePkg/Include/IndustryStandard/PeImage.h | 15 +++++++++++++++ >=C2=A0 1 file changed, 15 insertions(+)
>
> diff --git a/MdePkg/Include/IndustryStandard/PeImage.h
> b/MdePkg/Include/IndustryStandard/PeImage.h
> index 47037049348c..430e8988f550 100644
> --- a/MdePkg/Include/IndustryStandard/PeImage.h
> +++ b/MdePkg/Include/IndustryStandard/PeImage.h
> @@ -269,6 +269,21 @@ typedef struct {
>=C2=A0 #define EFI_IMAGE_SUBSYSTEM_OS2_CUI=C2=A0 =C2=A0 =C2=A0 5
>=C2=A0 #define EFI_IMAGE_SUBSYSTEM_POSIX_CUI=C2=A0 =C2=A0 7
>
> +//
> +// DLL Characteristics
> +//
> +#define IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA=C2=A0 =C2=A0 =C2=A0 = =C2=A0 0x0020
> +#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A00x0040
> +#define IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY=C2=A0 =C2=A0 =C2=A0 = =C2=A0 0x0080
> +#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 0x0100
> +#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A00x0200
> +#define IMAGE_DLLCHARACTERISTICS_NO_SEH=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00x0400
> +#define IMAGE_DLLCHARACTERISTICS_NO_BIND=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x0800
> +#define IMAGE_DLLCHARACTERISTICS_APPCONTAINER=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A00x1000
> +#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A00x2000
> +#define IMAGE_DLLCHARACTERISTICS_GUARD_CF=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A00x4000
> +#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE=C2=A0 0x8000 > +
>=C2=A0 ///
>=C2=A0 /// Length of ShortName.
>=C2=A0 ///
> --
> 2.41.0.windows.1

--0000000000001fe7b905ff235884--