From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 2E8C021D0DE5F for ; Tue, 25 Jul 2017 02:07:20 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2017 02:09:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,411,1496127600"; d="scan'208";a="1155094301" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 25 Jul 2017 02:09:21 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Jul 2017 02:09:20 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Jul 2017 02:09:20 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Tue, 25 Jul 2017 17:09:18 +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+ZaLQCePXmnkVRlHwgAg1CNQAAEYgJAAAImFIA== Date: Tue, 25 Jul 2017 09:09:18 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B8F59EA@shsmsx102.ccr.corp.intel.com> References: <0C09AFA07DD0434D9E2A0C6AEB0483103B8F5988@shsmsx102.ccr.corp.intel.com> In-Reply-To: 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: [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 09:07:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable As I know submitting ECR needs log in as a member at http://www.uefi.org/me= mberslogin, I am not sure the whole process. If needed, I can help to submit the ECR. According to EDK2 coding style doc at https://edk2-docs.gitbooks.io/edk-ii-c-coding-standards-specification/conte= nt/5_source_files/57_c_programming.html#table-9-parameter-modifiers IN OUT Passed by reference, and the passed-in referenced data is consumed a= nd then modified by the routine. But the code will not consume the pass in referenced data. Personally, I do= n't think just checking NULL pointer should be marked as 'IN' Thanks, Star -----Original Message----- From: Marvin H?user [mailto:Marvin.Haeuser@outlook.com]=20 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 EFI_PEI_GET_VARIABLE= 2. Hey Star, Thanks for your comment! Sorry, I never submited such a report, could you p= lease point me in the right direction? The only way of contact I found on t= he site of the UEFI Forum were Administration and Press, both don't sound l= ike the right place to post to. Or Is 'Administration' specification admini= stration rather than forum administration? Regarding 'IN': Correct me if I'm wrong, but in contrast to just 'OUT' para= meters, which are 'blindly' written to, 'Attributes' must be checked agains= t NULL first before attempting a dereference. Is this not the correct usage= of IN? Is IN only used, when the pointer's destination is read? Thanks again! Regards, Marvin. > -----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. >=20 > Marvin, >=20 > I think you are right about the statement of decorator 'OPTIONAL', you=20 > can submit PI ECR, then it can be aligned with UEFI EFI_GET_VARIABLE. > 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 > ); >=20 > 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. >=20 >=20 >=20 > Thanks, > Star > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of=20 > 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. >=20 > Dear developers, >=20 > I noticed that EFI_PEI_GET_VARIABLE2 is lacking decorators in both the=20 > 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 decora= tor 'OPTIONAL'. > Furthermore, as the possibility of it being NULL is not coupled to the=20 > values of the other parameters, 'IN' should be added as well. >=20 > Can someone please forward this to the right working group? >=20 > Thanks and best regards, > Marvin. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel