From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 363AC1A1E02 for ; Tue, 20 Sep 2016 05:02:31 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 20 Sep 2016 05:02:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,367,1470726000"; d="scan'208";a="1033629114" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 20 Sep 2016 05:02:30 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 20 Sep 2016 05:02:25 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.101]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.118]) with mapi id 14.03.0248.002; Tue, 20 Sep 2016 20:02:23 +0800 From: "Wu, Hao A" To: Ard Biesheuvel CC: "leif.lindholm@linaro.org" , "edk2-devel@lists.01.org" , "vishalo@qti.qualcomm.com" , "Gao, Liming" Thread-Topic: [edk2] [PATCH v2 2/3] MdePkg/BaseMemoryLib*: add missing ASSERT()s Thread-Index: AQHSEk3anE3a3Xkm9kuGiOdJBjsUpKCBn2Xw///qlgCAALyOYA== Date: Tue, 20 Sep 2016 12:02:22 +0000 Message-ID: References: <1474272831-20840-1-git-send-email-ard.biesheuvel@linaro.org> <1474272831-20840-3-git-send-email-ard.biesheuvel@linaro.org> 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: [PATCH v2 2/3] MdePkg/BaseMemoryLib*: add missing ASSERT()s X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 12:02:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ar= d > Biesheuvel > Sent: Tuesday, September 20, 2016 4:38 PM > To: Wu, Hao A > Cc: leif.lindholm@linaro.org; edk2-devel@lists.01.org; > vishalo@qti.qualcomm.com; Gao, Liming > Subject: Re: [edk2] [PATCH v2 2/3] MdePkg/BaseMemoryLib*: add missing > ASSERT()s >=20 > On 20 September 2016 at 03:00, Wu, Hao A wrote: > > Hi Ard, > > > > The NULL checks for the input Guids in APIs CopyGuid(), CompareGuid() a= nd > > IsZeroGuid() are implicitly done within calls to BaseLib APIs > > ReadUnaligned64() and WriteUnaligned64(). > > > > So I think the functions behavior matches with their comments. What do = you > > think? > > >=20 > I disagree. ReadUnaligned64 and WriteUnaligned64 could theoretically > be implemented by a version of BaseLib that does not contain such > ASSERT()s The comments for APIs ReadUnaligned64 and WriteUnaligned64 in BaseLib mention the ASSERT() for inputting a NULL buffer. I think instances of BaseLib should follow the comments. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel