From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id ADFCC80469 for ; Mon, 20 Mar 2017 08:09:16 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 20 Mar 2017 08:09:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,194,1486454400"; d="scan'208";a="1144694816" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 20 Mar 2017 08:09:12 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Mar 2017 08:09:12 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Mar 2017 08:09:11 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Mon, 20 Mar 2017 23:09:10 +0800 From: "Yao, Jiewen" To: Laszlo Ersek , edk2-devel-01 CC: Ard Biesheuvel , "Tian, Feng" , "Zeng, Star" Thread-Topic: [PATCH] MdeModulePkg/Core/Dxe: downgrade "CodeSegmentCount is 0" msg to DEBUG_WARN Thread-Index: AQHSoWqL418h7Ai3HE2lYVgtvEG1IqGd0/Rg Date: Mon, 20 Mar 2017 15:09:08 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A90747D@shsmsx102.ccr.corp.intel.com> References: <20170320110953.10033-1-lersek@redhat.com> In-Reply-To: <20170320110953.10033-1-lersek@redhat.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/Core/Dxe: downgrade "CodeSegmentCount is 0" msg to DEBUG_WARN X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2017 15:09:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I agree to downgrade the logging level. Can we add the comment, from log message to the comment in the C code? Such as below: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D // // UEFI executables that consist of a single read+write+exec PE/COFF sectio= n // isn't actually an error. // The image can be launched alright, only image protection cannot be appli= ed // to it fully. // // One example that elicits this is (some) Linux kernels (with the EFI // stub of course). // =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D With comment added, reviewed-by: Jiewen.yao@intel.com Thank you Yao Jiewen > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Monday, March 20, 2017 7:10 PM > To: edk2-devel-01 > Cc: Ard Biesheuvel ; Tian, Feng > ; Yao, Jiewen ; Zeng, Star > > Subject: [PATCH] MdeModulePkg/Core/Dxe: downgrade "CodeSegmentCount is > 0" msg to DEBUG_WARN >=20 > UEFI executables that consist of a single read+write+exec PE/COFF section > trigger this message, but such a binary layout isn't actually an error. > The image can be launched alright, only image protection cannot be applie= d > to it fully. >=20 > One example that elicits the message is (some) Linux kernels (with the EF= I > stub of course). >=20 > Cc: Ard Biesheuvel > Cc: Feng Tian > Cc: Jiewen Yao > Cc: Star Zeng > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek > --- > MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c > b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c > index 7689c794a8ad..699c9a827720 100644 > --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c > +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c > @@ -580,10 +580,10 @@ ProtectUefiImageCommon ( > } >=20 > if (ImageRecord->CodeSegmentCount =3D=3D 0) { > - DEBUG ((DEBUG_ERROR, "!!!!!!!! ProtectUefiImageCommon - > CodeSegmentCount is 0 !!!!!!!!\n")); > + DEBUG ((DEBUG_WARN, "!!!!!!!! ProtectUefiImageCommon - > CodeSegmentCount is 0 !!!!!!!!\n")); > PdbPointer =3D PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) > ImageAddress); > if (PdbPointer !=3D NULL) { > - DEBUG ((DEBUG_ERROR, "!!!!!!!! Image - %a !!!!!!!!\n", PdbPointe= r)); > + DEBUG ((DEBUG_WARN, "!!!!!!!! Image - %a !!!!!!!!\n", > PdbPointer)); > } > goto Finish; > } > -- > 2.9.3