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.web10.2017.1589995549621805619 for ; Wed, 20 May 2020 10:25:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MOe1Z4TQ; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589995548; 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=OsWlfwgIV2JKXXQxKFG2KvoL/u4hHMpLdY1jNObJblY=; b=MOe1Z4TQYmixOyKbeVD+CatgV+70hYcXiYeGSJgzsY2AOy/AFBFrjq17J5jIhwRhbwKrQ+ 76wAp0aGSBR5yP2se0HqCiVm8neYddRA7xrCy5HV0vFWiCC1hTh058qFUlJxP6uusgDDMv 8Q/1O9Wu6QLaSJELiCV8crXClCUPdqg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-221-3Rjhk-k4N5u6qXu2d38Wlg-1; Wed, 20 May 2020 13:25:40 -0400 X-MC-Unique: 3Rjhk-k4N5u6qXu2d38Wlg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C3D9D461; Wed, 20 May 2020 17:25:37 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-121.ams2.redhat.com [10.36.115.121]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8175419451; Wed, 20 May 2020 17:25:34 +0000 (UTC) Subject: Re: [Patch v8 1/2] MdePkg: Fix SafeString performing assertions on runtime checks To: Michael D Kinney , devel@edk2.groups.io Cc: Vitaly Cheptsov , Andrew Fish , Ard Biesheuvel , Bret Barkelew , "Brian J . Johnson" , Chasel Chiu , Jordan Justen , Leif Lindholm , Liming Gao , Marvin H?user , Vincent Zimmer , Zhichao Gao , Jiewen Yao References: <20200520031108.9644-1-michael.d.kinney@intel.com> <20200520031108.9644-2-michael.d.kinney@intel.com> From: "Laszlo Ersek" Message-ID: <8ceb3615-69f1-3430-9ae2-731cbcebf6c1@redhat.com> Date: Wed, 20 May 2020 19:25:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200520031108.9644-2-michael.d.kinney@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 05/20/20 05:11, Michael D Kinney wrote: > From: Vitaly Cheptsov > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2054 > > Runtime checks returned via status return code should not work as > assertions to permit parsing not trusted data with SafeString > interfaces. Replace ASSERT() with a DEBUG_VERBOSE message. > > Cc: Andrew Fish > Cc: Ard Biesheuvel > Cc: Bret Barkelew > Cc: Brian J. Johnson > Cc: Chasel Chiu > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Leif Lindholm > Cc: Liming Gao > Cc: Marvin H?user > Cc: Michael D Kinney > Cc: Vincent Zimmer > Cc: Zhichao Gao > Cc: Jiewen Yao > Signed-off-by: Vitaly Cheptsov > --- > MdePkg/Include/Library/BaseLib.h | 111 --------------------------- > MdePkg/Library/BaseLib/SafeString.c | 115 +--------------------------- > 2 files changed, 3 insertions(+), 223 deletions(-) Reviewed-by: Laszlo Ersek