From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6B4301A1DFB for ; Tue, 20 Sep 2016 05:40:50 -0700 (PDT) Received: by mail-it0-x234.google.com with SMTP id n143so17195273ita.1 for ; Tue, 20 Sep 2016 05:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pNQ5GsxPgjMBJQdtQ5ewEAXnIiYM1YkDiWKGYmw2Pio=; b=jYVnLk17fDKvUjd17469efkLr0Q+tawcg7JeTGl7HOLEDfivX8zAgtIROoa1nCqSrK +Cw0b6FgTCzczZzn2K8XR7UcEQsWFexd0z99nUWxqN0iFtXSXiU4htWvR7KLFMQkFnJL 4uEfGuhdLzACMWASsoarg3h/VTJ8fLE2bZUZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pNQ5GsxPgjMBJQdtQ5ewEAXnIiYM1YkDiWKGYmw2Pio=; b=PlUdp49xNZUNH235UaKV8WuuzPKbBM6Q7dB1jQ+MLcLjlINvJ3IT2J9ONchtyqWV6x kTh6f2nk+kNE5vxRsEb6dGPOM0GiaM6jC7mJaPFWo5xmLTimsIHFdfmxvcPKeLXNl4gy lP4DVCkyK6Wbk8zvcoEmnILBLj7QQ+macZEpX74TS99qTc1+WT9OSjBCiN2ViP6L5f+F EXWNqHQPVFjYMKJQdn8iDEBN2eqqk7jNuGTxYOAYpmKJDN8fAQjA2sp7yTl7YBffTEfT uCgcZDymiar0go5GHLePvJqtafgNN0f8eiPT+Ywh0Cxs0VfrqgRrO5WoBTzudCGJ/wTf jOOA== X-Gm-Message-State: AE9vXwOT36XpMwLRQx2/Djt7dk7YtgP8CHKYeuZLgOqkXwE438jQOIyMnsCXje6GlbrbNotvzXyGJC8Y3ylz4dhQ X-Received: by 10.36.20.204 with SMTP id 195mr3970230itg.83.1474375249786; Tue, 20 Sep 2016 05:40:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Tue, 20 Sep 2016 05:40:49 -0700 (PDT) In-Reply-To: References: <1474272831-20840-1-git-send-email-ard.biesheuvel@linaro.org> <1474272831-20840-3-git-send-email-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Tue, 20 Sep 2016 13:40:49 +0100 Message-ID: To: "Wu, Hao A" Cc: "leif.lindholm@linaro.org" , "edk2-devel@lists.01.org" , "vishalo@qti.qualcomm.com" , "Gao, Liming" 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:40:50 -0000 Content-Type: text/plain; charset=UTF-8 On 20 September 2016 at 13:16, Ard Biesheuvel wrote: > On 20 September 2016 at 13:02, Wu, Hao A wrote: >>> -----Original Message----- >>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard >>> 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 >>> >>> On 20 September 2016 at 03:00, Wu, Hao A wrote: >>> > Hi Ard, >>> > >>> > The NULL checks for the input Guids in APIs CopyGuid(), CompareGuid() and >>> > 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? >>> > >>> >>> 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. >> > > I agree with this. But that does not justify omitting them here. ... but actually, it makes no sense to argue about this, since the user visible outcome is the same. I will withdraw the patch. Thanks, Ard.