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 F1C031A1DF7 for ; Tue, 20 Sep 2016 05:16:08 -0700 (PDT) Received: by mail-it0-x234.google.com with SMTP id r192so95727910ita.0 for ; Tue, 20 Sep 2016 05:16:08 -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=hOlkhmpIENOdsjgMG299sL/CLQO49S6x2bBnc5jWQC8=; b=feobjDOW1ppOqhF6mvxzVDa9x8z/j4J4JiJTcRm0oMKaM1p/23dF4Lgll7eiSVy0/6 ngKCGh1UPCKXqWL6LbYk86nFNJecq7myc3a5v4xi/DC2IKn48/O0JB+M3XaW6xl/ca3d RrZCEIgF7X7iaYIwo0qWM1/twl/zzZ11ddveE= 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=hOlkhmpIENOdsjgMG299sL/CLQO49S6x2bBnc5jWQC8=; b=Kova5flQeD1ll80Yky9rOKmfttT56Wh0m/A6epQ+C0UCzfNGobs9vif76rhwyLpJte srjbzV3yLKpPJHCUswj5nwmu8I5IWgYmkuS7KCCoZ7APmTS3NtTd5rm2ORonYnFKIWfW 5yfzicbVi2aXTJLNltah2pvcKRhWOX4R5798CKtwE/C/VUgvAR9c1GNxaUGbqTwzTONI xaeID50Qdl57Iddz1OlYLO0SVymawYA4wCv7wf5zj4j9Eez0NtXkR+mNtVpYEKFJ2pU3 WwjlZT/WMyNhMVHojL3INyiEh7ngRY/Aq5FUzvBFFqGb4yOrGQE41S7boh2qogX97DrL 1aow== X-Gm-Message-State: AE9vXwOf6lFaNVyd8DJZ60szPmppgUFdVSYyxg6fbAzy/JA87odZ4VwCsncycS4yMUvf9t+FtSEkLqYy97Gm3syt X-Received: by 10.36.19.209 with SMTP id 200mr3843917itz.83.1474373768199; Tue, 20 Sep 2016 05:16:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Tue, 20 Sep 2016 05:16:07 -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:16:07 +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:16:09 -0000 Content-Type: text/plain; charset=UTF-8 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.