From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7743D21A16E4A for ; Sun, 4 Jun 2017 22:15:25 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP; 04 Jun 2017 22:16:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,299,1493708400"; d="scan'208";a="1156578249" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 04 Jun 2017 22:16:29 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 4 Jun 2017 22:16:29 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 4 Jun 2017 22:16:29 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.56]) with mapi id 14.03.0319.002; Mon, 5 Jun 2017 13:16:25 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdePkg SmmMemLib: Remove ASSERT in SmmIsBufferOutsideSmmValid Thread-Index: AQHS3bdkxum2eFNeR0+5/zYEfzSnTaIVukgQ Date: Mon, 5 Jun 2017 05:16:24 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A963721@shsmsx102.ccr.corp.intel.com> References: <1496638269-56000-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1496638269-56000-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdePkg SmmMemLib: Remove ASSERT in SmmIsBufferOutsideSmmValid X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2017 05:15:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Zeng, Star > Sent: Monday, June 5, 2017 12:51 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen ;= Bret > Barkelew > Subject: [PATCH] MdePkg SmmMemLib: Remove ASSERT in > SmmIsBufferOutsideSmmValid >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D577 >=20 > Currently the SmmIsBufferOutsideSmmValid() function in SmmMemLib.c will > ASSERT in certain conditions. Since this function is a "test" function, > it should not be making decisions on how to handle a failure. > Handling a failure should be left to the caller. >=20 > This patch is to remove ASSERT(FALSE) at line 178 of SmmMemLib.c. >=20 > Cc: Jiewen Yao > Cc: Bret Barkelew > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Star Zeng > --- > MdePkg/Library/SmmMemLib/SmmMemLib.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/MdePkg/Library/SmmMemLib/SmmMemLib.c > b/MdePkg/Library/SmmMemLib/SmmMemLib.c > index b4e3156cb42a..db55a1a6c150 100644 > --- a/MdePkg/Library/SmmMemLib/SmmMemLib.c > +++ b/MdePkg/Library/SmmMemLib/SmmMemLib.c > @@ -6,7 +6,7 @@ > all SMRAM range via SMM_ACCESS2_PROTOCOL, including the range for > firmware (like SMM Core > and SMM driver) and/or specific dedicated hardware. >=20 > - Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License > which accompanies this distribution. The full text of the license may= be > found at > @@ -175,7 +175,6 @@ SmmIsBufferOutsideSmmValid ( > Buffer, > Length > )); > - ASSERT (FALSE); > return FALSE; > } > } > -- > 2.7.0.windows.1