From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 B11D721C91262 for ; Tue, 25 Jul 2017 06:12:35 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2017 06:14:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,411,1496127600"; d="scan'208";a="111767061" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 25 Jul 2017 06:14:37 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Jul 2017 06:14:21 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Jul 2017 06:14:21 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.197]) with mapi id 14.03.0319.002; Tue, 25 Jul 2017 21:14:19 +0800 From: "Zeng, Star" To: Marvin H?user , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [UEFI PI 1.6/EDK2] Missing decorators for EFI_PEI_GET_VARIABLE2. Thread-Index: AdMEm0stAu8v+ZaLQCePXmnkVRlHwgAg1CNQAAEYgJAAAImFIAABJhJAAABETjAABz/ecA== Date: Tue, 25 Jul 2017 13:14:19 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B8F5B03@shsmsx102.ccr.corp.intel.com> References: <0C09AFA07DD0434D9E2A0C6AEB0483103B8F5988@shsmsx102.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B8F59EA@shsmsx102.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B8F5A30@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B8F5A30@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [UEFI PI 1.6/EDK2] Missing decorators for EFI_PEI_GET_VARIABLE2. 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: Tue, 25 Jul 2017 13:12:35 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable ECR 1828: Add decorator 'OPTIONAL' for Attributes parameter of EFI_PEI_GET_= VARIABLE2 has been submitted. Thanks, Star -----Original Message----- From: Zeng, Star=20 Sent: Tuesday, July 25, 2017 5:46 PM To: Marvin H?user ; edk2-devel@lists.01.org Cc: Zeng, Star Subject: RE: [UEFI PI 1.6/EDK2] Missing decorators for EFI_PEI_GET_VARIABLE= 2. Sure, I will help do that. :) Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Marv= in H?user Sent: Tuesday, July 25, 2017 5:43 PM To: edk2-devel@lists.01.org Cc: Zeng, Star Subject: Re: [edk2] [UEFI PI 1.6/EDK2] Missing decorators for EFI_PEI_GET_V= ARIABLE2. Sorry, I remembered 'IN OUT' incorrectly then, you are correct. Only 'OPTIO= NAL' is lacking. Would be very kind of you if you could help submitting the ECR, I do not ha= ve an active account at this point. Thanks, Marvin. > -----Original Message----- > From: Zeng, Star [mailto:star.zeng@intel.com] > Sent: Tuesday, July 25, 2017 11:09 AM > To: Marvin H?user ; edk2-=20 > devel@lists.01.org > Cc: Zeng, Star > Subject: RE: [UEFI PI 1.6/EDK2] Missing decorators for=20 > EFI_PEI_GET_VARIABLE2. >=20 > As I know submitting ECR needs log in as a member at=20 > http://www.uefi.org/memberslogin, I am not sure the whole process. > If needed, I can help to submit the ECR. >=20 > According to EDK2 coding style doc at > https://edk2-docs.gitbooks.io/edk-ii-c-coding-standards- > specification/content/5_source_files/57_c_programming.html#table-9- > parameter-modifiers > IN OUT Passed by reference, and the passed-in referenced data is consumed > and then modified by the routine. >=20 > But the code will not consume the pass in referenced data. Personally,=20 > I don't think just checking NULL pointer should be marked as 'IN' >=20 >=20 > Thanks, > Star > -----Original Message----- > From: Marvin H?user [mailto:Marvin.Haeuser@outlook.com] > Sent: Tuesday, July 25, 2017 4:58 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star > Subject: RE: [UEFI PI 1.6/EDK2] Missing decorators for=20 > EFI_PEI_GET_VARIABLE2. >=20 > Hey Star, >=20 > Thanks for your comment! Sorry, I never submited such a report, could=20 > you please point me in the right direction? The only way of contact I=20 > found on the site of the UEFI Forum were Administration and Press,=20 > both don't sound like the right place to post to. Or Is=20 > 'Administration' specification administration rather than forum administr= ation? >=20 > Regarding 'IN': Correct me if I'm wrong, but in contrast to just 'OUT' > parameters, which are 'blindly' written to, 'Attributes' must be=20 > checked against NULL first before attempting a dereference. Is this=20 > not the correct usage of IN? Is IN only used, when the pointer's destinat= ion is read? >=20 > Thanks again! >=20 > Regards, > Marvin. >=20 > > -----Original Message----- > > From: Zeng, Star [mailto:star.zeng@intel.com] > > Sent: Tuesday, July 25, 2017 10:25 AM > > To: Marvin H?user ; edk2-=20 > > devel@lists.01.org > > Cc: Zeng, Star > > Subject: RE: [UEFI PI 1.6/EDK2] Missing decorators for=20 > > EFI_PEI_GET_VARIABLE2. > > > > Marvin, > > > > I think you are right about the statement of decorator 'OPTIONAL',=20 > > you can submit PI ECR, then it can be aligned with UEFI EFI_GET_VARIABL= E. > > typedef > > EFI_STATUS > > (EFIAPI *EFI_GET_VARIABLE)( > > IN CHAR16 *VariableName, > > IN EFI_GUID *VendorGuid, > > OUT UINT32 *Attributes, OPTIONAL > > IN OUT UINTN *DataSize, > > OUT VOID *Data OPTIONAL > > ); > > > > And since the passed-in state of the referenced data is not used by=20 > > the routine, I don't think decorator 'IN' should be added. > > > > > > > > Thanks, > > Star > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf=20 > > Of Marvin H?user > > Sent: Tuesday, July 25, 2017 12:42 AM > > To: edk2-devel@lists.01.org > > Subject: [edk2] [UEFI PI 1.6/EDK2] Missing decorators for=20 > > EFI_PEI_GET_VARIABLE2. > > > > Dear developers, > > > > I noticed that EFI_PEI_GET_VARIABLE2 is lacking decorators in both=20 > > the UEFI PI 1.6 specification and the EDK2 codebase. The parameter=20 > > description for 'Attributes' starts with 'If non-NULL', hence it may=20 > > be NULL, which is not reflected in the function prototype with the > decorator 'OPTIONAL'. > > Furthermore, as the possibility of it being NULL is not coupled to=20 > > the values of the other parameters, 'IN' should be added as well. > > > > Can someone please forward this to the right working group? > > > > Thanks and best regards, > > Marvin. > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel