From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web11.9639.1588942790974661021 for ; Fri, 08 May 2020 05:59:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CmH7/hpN; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588942790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=86okZgADWFo8Engqcbeb4uWyisA3wu1XzwT968EUm+c=; b=CmH7/hpNNArjm5X6UfS/gv6z754qJgkVhF2KH0R8b214ebzgc1rzJEII+0s8KDchvz6bBe 2ie6sQFb++p5zrCb47LRDl3JA/qNJhRIOuzyfSkXln4IlubFjrt/X9ERuVLL3RhWfJ2/JM sktcPBUaYKCKwVBPwDIGJzbV3HP5daY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-235-Okgf8aiFPii28OOPUImo2g-1; Fri, 08 May 2020 08:59:42 -0400 X-MC-Unique: Okgf8aiFPii28OOPUImo2g-1 Received: by mail-wr1-f71.google.com with SMTP id q13so826974wrn.14 for ; Fri, 08 May 2020 05:59:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=m00c8zl9Lp/mJQm9T+NyH/0rSBaD47PUSCPurTnjacY=; b=ukggSgW+zo431bqYX9zCtigy1KJ+gC4eRKMz7kY3LtqIjTw3hsS2dYTVBJSMZpacmv G+bN4zhFNrWbWn9qKjD6TvNhe1bW787DJtNp5TxL+Rn81BCCIBj0oCX+DVQQWhZApM/o XelXsUn/Jfy6QFhyGZIpIfsvQCFPYrX39wru2Ad36ba0t0PzQQGGzz5nId+x2ZvYjoZI TRc9HKiwu0W29PBGoRpKJryhcw6Bnc5UTQzj05u9IK6sl3rkbsyDNt0XwolWEOS2tbP8 +omWnBLT/8QtzCQ36R0tdOSkro1+N+hJ9wYm/4vs5Rz7U+xC719myHR1aCXdeBuxTrHz dADw== X-Gm-Message-State: AGi0PuZA/kfCKlT3UmRpV26HmN+YN5Px4hYi60RIgFqzJYbRpX1RzLo0 4QbUjqUOlRMSGl+u80T3Tv6KkZb6NYyy8Qmn0fcq0Il+H7q6DZnWJdGjOhenhBpdh9q4VI88yO3 BzGWJP5op//jjkQ== X-Received: by 2002:a05:600c:206:: with SMTP id 6mr1932600wmi.171.1588942780904; Fri, 08 May 2020 05:59:40 -0700 (PDT) X-Google-Smtp-Source: APiQypJEQjO2Eg9hwc+sNs4P+roQL+0PnUkJ9ERHqUtCpULr4XWPuzNBhQ23iy8ci4ifVXBZNQZeew== X-Received: by 2002:a05:600c:206:: with SMTP id 6mr1932586wmi.171.1588942780684; Fri, 08 May 2020 05:59:40 -0700 (PDT) Return-Path: Received: from [192.168.1.38] (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id m1sm2540117wrx.44.2020.05.08.05.59.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 May 2020 05:59:40 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH V3 1/8] CryptoPkg/CryptoDxe: Add function to indicate the deprecated algorithm To: "Gao, Zhichao" , "devel@edk2.groups.io" Cc: "Wang, Jian J" , "Lu, XiaoyuX" , "Fu, Siyuan" , "Kinney, Michael D" , "Yao, Jiewen" References: <20200506235746.19500-1-zhichao.gao@intel.com> <20200506235746.19500-2-zhichao.gao@intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <41ef0db0-6105-e712-9c60-bc242094a9a1@redhat.com> Date: Fri, 8 May 2020 14:59:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5/8/20 3:09 AM, Gao, Zhichao wrote: > Thanks for point out the typo. I would fix it. > About the align, see below. >=20 >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Philippe >> Mathieu-Daud=C3=A9 >> Sent: Thursday, May 7, 2020 3:48 PM >> To: edk2-devel-groups-io ; Gao, Zhichao >> >> Cc: Wang, Jian J ; Lu, XiaoyuX ; >> Fu, Siyuan ; Kinney, Michael D >> ; Yao, Jiewen >> Subject: Re: [edk2-devel] [PATCH V3 1/8] CryptoPkg/CryptoDxe: Add funct= ion to >> indicate the deprecated algorithm >> >> On Thu, May 7, 2020 at 9:45 AM Philippe Mathieu-Daud=C3=A9 >> wrote: >>> >>> On 5/7/20 1:57 AM, Gao, Zhichao wrote: >>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1898 >>>> >>>> Add a internal worker function to indicate the deprecated functions. >>>> It would print out debug messages and asserts ot inform the consumer >>> >>> Typo "to inform". >>> >>>> they are using a deprecated function. >>>> >>>> Cc: Jian J Wang >>>> Cc: Xiaoyu Lu >>>> Cc: Siyuan Fu >>>> Cc: Michael D Kinney >>>> Cc: Jiewen Yao >>>> Signed-off-by: Zhichao Gao >>>> --- >>>> CryptoPkg/Driver/Crypto.c | 18 ++++++++++++++++++ >>>> 1 file changed, 18 insertions(+) >>>> >>>> diff --git a/CryptoPkg/Driver/Crypto.c b/CryptoPkg/Driver/Crypto.c >>>> index 35bf2d3d92..05ad4b5d55 100644 >>>> --- a/CryptoPkg/Driver/Crypto.c >>>> +++ b/CryptoPkg/Driver/Crypto.c >>>> @@ -86,6 +86,24 @@ BaseCryptLibServciceNotEnabled ( >>>> ASSERT_EFI_ERROR (EFI_UNSUPPORTED); >>>> } >>>> >>>> +/** >>>> + Internal worker function that prints a debug message and asserts >>>> +if a call is >>>> + made to a BaseCryptLib function that is deprecated and unsupported= any >> longer. >>>> + >>>> + @param[in] FunctionName Null-terminated ASCII string that is the= name >> of an >>>> + EDK II Crypto service. >>>> + >>>> +**/ >>>> +static >>>> +VOID >>>> +BaseCryptLibServciceDeprecated ( >> >> Oh also another typo (extra 'c'): >> >> "BaseCryptLibServiceDeprecated" >> >> Maybe rename as "BaseCryptLibDeprecatedService"? >> >>>> + IN CONST CHAR8 *FunctionName >>> >>> Why extra space alignment? >=20 > See the CCS spec 2.1, 5.7.17: > 5.7.1.7 The next lines contain parameters. > Each line will contain a single argument and will start indented two spa= ces (one tab stop). Type > and argument columns should be aligned to maximize readability and shoul= d include > appropriate spacing to ensure this alignment. No comments are allowed in= this region. > Parameters are documented clearly in the function header comment block. OK, thanks Zhichao. >=20 > Thanks, > Zhichao >=20 >>> >>> Otherwise: >>> Reviewed-by: Philippe Mathieu-Daude >>> >>>> + ) >>>> +{ >>>> + DEBUG ((DEBUG_ERROR, "[%a] Function %a() is deprecated and >>>> +unsupported any longer\n", gEfiCallerBaseName, FunctionName)); >>>> + ASSERT_EFI_ERROR (EFI_UNSUPPORTED); } >>>> + >>>> /** >>>> Returns the version of the EDK II Crypto Protocol. >>>> >>>> >> >> >>=20 >=20