From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5F922D8094F for ; Tue, 29 Aug 2023 10:46:10 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Gs1acmohOLLbKKluOaTEn2JFyaIRmAQcxvEe0H5dQ+E=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1693305969; v=1; b=oAgfvNv5DLA2dyjTAmVTO7nOsEbCxfAgiK6zSfqkwASKK0UPKZjliLxsLxFLcF9reCU4HKmx axVr+m3n6HEVl2fq5fMczD5aqTBqD/VhsiVH5iJHFNorn0CZvjMjo9NsR6zSTbCmpC3LmRITLsc mAFUzfq1RRkqslUB7nZcC6d0= X-Received: by 127.0.0.2 with SMTP id khpeYY7687511xsgQAXxsbQK; Tue, 29 Aug 2023 03:46:09 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.14453.1693305968381989894 for ; Tue, 29 Aug 2023 03:46:08 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-270-oLh6I7JNOzKENsYcgKAa-Q-1; Tue, 29 Aug 2023 06:46:04 -0400 X-MC-Unique: oLh6I7JNOzKENsYcgKAa-Q-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B25C48D40A5; Tue, 29 Aug 2023 10:46:03 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 302BB1121318; Tue, 29 Aug 2023 10:46:02 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 794D0180093B; Tue, 29 Aug 2023 12:46:01 +0200 (CEST) Date: Tue, 29 Aug 2023 12:46:01 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, taylor.d.beebe@gmail.com Cc: Jian J Wang , Liming Gao Subject: Re: [edk2-devel] [PATCH v2 19/25] MdeModulePkg: Add Additional Profiles to SetMemoryProtectionsLib Message-ID: <527awt5twopgc2e5wvkfmom7adrwqoltafrooqvorbwd65efjb@boftzx2w2pxn> References: <20230818223159.1073-1-taylor.d.beebe@gmail.com> <20230818223159.1073-20-taylor.d.beebe@gmail.com> MIME-Version: 1.0 In-Reply-To: <20230818223159.1073-20-taylor.d.beebe@gmail.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk 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,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: qJTCQPeRYnyT5LlXLvoXDivAx7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=oAgfvNv5; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) > //////////////////////////// > // PROFILE CONFIGURATIONS // > //////////////////////////// > > DXE_MEMORY_PROTECTION_PROFILES DxeMemoryProtectionProfiles[DxeMemoryProtectionSettingsMax] = { > + { > + .Name = L"Debug", > + .Description = L"Development profile ideal for debug scenarios", > + .Settings = DXE_MEMORY_PROTECTION_SETTINGS_DEBUG > + }, > + { > + .Name = L"Release", > + .Description = L"Release profile recommended for production scenarios", > + .Settings = DXE_MEMORY_PROTECTION_SETTINGS_PROD_MODE > + }, > + { > + .Name = L"ReleaseNoPageGuards", > + .Description = L"Release profile without page guards recommended for performance sensitive production scenarios", > + .Settings = DXE_MEMORY_PROTECTION_SETTINGS_PROD_MODE_NO_PAGE_GUARDS > + }, > { > .Name = L"Pcd", > .Description = L"Memory protection settings from PCDs", > .Settings = DXE_MEMORY_PROTECTION_SETTINGS_PCD > }, > + { > + .Name = L"Off", > + .Description = L"Disables all memory protection settings", > + .Settings = DXE_MEMORY_PROTECTION_SETTINGS_OFF > + } > }; > --- a/MdeModulePkg/Include/Library/SetMemoryProtectionsLib.h > +++ b/MdeModulePkg/Include/Library/SetMemoryProtectionsLib.h > @@ -17,6 +17,10 @@ typedef struct { > } DXE_MEMORY_PROTECTION_PROFILES; > > typedef enum { > + DxeMemoryProtectionSettingsDebug = 0, > + DxeMemoryProtectionSettingsRelease, > + DxeMemoryProtectionSettingsReleaseNoPageGuards, > + DxeMemoryProtectionSettingsOff, > DxeMemoryProtectionSettingsPcd, > DxeMemoryProtectionSettingsMax > } DXE_MEMORY_PROTECTION_PROFILE_INDEX; Ordering mismatch for "pcd" and "off". I'd suggest to use C99 initializers, i.e. DxeMemoryProtectionProfiles[] = { [ DxeMemoryProtectionSettingsDebug ] = { .Name = "Debug", to avoid that. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108088): https://edk2.groups.io/g/devel/message/108088 Mute This Topic: https://groups.io/mt/100830918/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-