From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web10.1911.1588837708573191943 for ; Thu, 07 May 2020 00:48:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q4SituN2; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588837707; 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=t0NkqivsNkc+g3ISDD+IKOfFErsQYy3KZnAvWoLhVEo=; b=Q4SituN2OrzV4cT6n5Qs7eYcMrD81FgLBnst6GQHtdxnEu/JU7+FnGrHitp+GaeGDIF/IA OqTYoGCbxzsiayERAm1+0PqZxpS26/Zfm8QlXJea2AIRodx8+3O7f5MdVuwyQVsoiku9HT H7Vu8nIXGMKWuyxEZKG3Y2BdQCmmyt8= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-347-neh5u4jRNrapSJ1BYetZLg-1; Thu, 07 May 2020 03:48:23 -0400 X-MC-Unique: neh5u4jRNrapSJ1BYetZLg-1 Received: by mail-wr1-f70.google.com with SMTP id y4so2923729wrt.4 for ; Thu, 07 May 2020 00:48:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=t0NkqivsNkc+g3ISDD+IKOfFErsQYy3KZnAvWoLhVEo=; b=amqLo3krD7OY3XVngwDBtf0gnvyArV6dVV69kud2tD3YXDjT3tHYYKc8coe8VMD0NO 8zdlWDMQWV9jRx2vY5170lT7g6bLPeRBi8wqvXU9EfaiZtTtX/0cjezZlQvm5o/iYkIA 80bku4opfPqaKtN3mGmrNHepCTqD3YgySGbg2iv1CRhqDPv0p5vFiU7QgDI113Uzp9Wn +IaPiCPCVH3gc4NX2wQSoZNqrkl1KgVGHxyaGzyKOS/73AB3YfXzLWg0M5Yiv4lMdVDG 4QP0BUihBa0YfwZebG3sEAIwACgJyMqnkEb9XEbYJgEgYAriqvrVuXd+9LA6ImJ0foj/ +3NQ== X-Gm-Message-State: AGi0PuYghN0iF6IQ4P3uxBcxacAVhN6a660cUudrLisB6Br2EsNVZ1Kp QIiojNZFC4OyO5iidZNw2Iw9mGPTaoyq+v6GZiN0Guyur1wtpbCyyU+/L//SZYZe8sCAYInyN/n rEX2uXkDCWsWAQ9UB+eKIA4xNpzBJaA== X-Received: by 2002:adf:e511:: with SMTP id j17mr15267499wrm.204.1588837702473; Thu, 07 May 2020 00:48:22 -0700 (PDT) X-Google-Smtp-Source: APiQypK40dOcxaPoSPwvZZzp9sM6Ug6xlM5KP64ohvQ/d7y9EK3KGqvMNt59cagu9SsZmrjIYpGeouAPNlLxuUV/grE= X-Received: by 2002:adf:e511:: with SMTP id j17mr15267473wrm.204.1588837702210; Thu, 07 May 2020 00:48:22 -0700 (PDT) MIME-Version: 1.0 References: <20200506235746.19500-1-zhichao.gao@intel.com> <20200506235746.19500-2-zhichao.gao@intel.com> In-Reply-To: From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Date: Thu, 7 May 2020 09:48:11 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH V3 1/8] CryptoPkg/CryptoDxe: Add function to indicate the deprecated algorithm To: edk2-devel-groups-io , Zhichao Gao Cc: Jian J Wang , Xiaoyu Lu , Siyuan Fu , Michael D Kinney , Jiewen Yao X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 a= ny longer. > > + > > + @param[in] FunctionName Null-terminated ASCII string that is the n= ame 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? > > Otherwise: > Reviewed-by: Philippe Mathieu-Daude > > > + ) > > +{ > > + DEBUG ((DEBUG_ERROR, "[%a] Function %a() is deprecated and unsupport= ed any longer\n", gEfiCallerBaseName, FunctionName)); > > + ASSERT_EFI_ERROR (EFI_UNSUPPORTED); > > +} > > + > > /** > > Returns the version of the EDK II Crypto Protocol. > > > >