From nobody Thu Apr 25 19:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+49662+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49662+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1572444535; cv=none; d=zoho.com; s=zohoarc; b=KlXOmC5usWsTRfcfK+m6pvfybgMUP4nJlhhI3Cm8DgvH/njidg+7UgLtVlO7eB4jpQFGBQ/D7iH4I/VO8S2dtcgbs9ayZq5pzb23CTDK5xnJRdr2sma3Sdz52BzaWHWrdAf4gx9qdzLVLnW21e0Cav5w6yPxJiyIt7FEjYFr4pw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572444535; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=khFltN1EVvnzlwFmYWUjxJMH0HKPNk54/y3fUO0R2Ic=; b=QTZBpl/5TxyC/nxSEnkkdlr04bWbr6k/Veuym8uw7e051W1wJBnXdp2f0zzdTVoQkEivVp2yVXYstCE1i7suL6Vv8hlqbPZKjzl3MSkVWH1E/unWjLZyKo0VPLQcvVqvA10R4ZhWvUx+x30mlP8kwA1h00d5b7/4CiENhDkD3+U= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49662+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1572444535282985.8124620249755; Wed, 30 Oct 2019 07:08:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Wed, 30 Oct 2019 07:08:54 -0700 X-Received: from mga09.intel.com (mga09.intel.com []) by mx.groups.io with SMTP id smtpd.web09.5473.1572444518732196805 for ; Wed, 30 Oct 2019 07:08:40 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 07:08:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,247,1569308400"; d="scan'208";a="203890068" X-Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 30 Oct 2019 07:08:39 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Hao A Wu , Ray Ni Subject: [edk2-devel] [PATCH v2 1/3] MdeModulePkg/EhciPei: Initialize the variable Map Date: Wed, 30 Oct 2019 22:08:28 +0800 Message-Id: <20191030140830.31156-2-shenglei.zhang@intel.com> In-Reply-To: <20191030140830.31156-1-shenglei.zhang@intel.com> References: <20191030140830.31156-1-shenglei.zhang@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,shenglei.zhang@intel.com X-Gm-Message-State: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1572444534; bh=XypoGBJ9kWAWTxe2gFzOPUPzylPYefdWkmL/sciclso=; h=Cc:Date:From:Reply-To:Subject:To; b=Sc80v6YzQy8aL+W+bBpr3YhYIxtls0vkJ5hRaJBYssM5hg7ENK/9BMhWhnhlYpqXpe7 gS9Xy0oDreIL8cIOJfMv5zMUxYMKB8zUdwlCZ4gZEmCddb5E4qzDp3UC9Z5rjWuKamH/k Nq0yxmUO/jeCP7uSfUBn6twn4AuSEit0How= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Map is used but not Initialized. Map is called by IoMmuMap, in which Mapping(Map) is called by IoMmu->Map. We can not assume Map is given an initial value at any step. Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Shenglei Zhang Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c b/MdeModulePkg/Bus/Pci/= EhciPei/EhciUrb.c index 7c6a6a5f9716..995ccd2463d2 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c @@ -534,6 +534,8 @@ EhcCreateUrb ( PEI_URB *Urb; VOID *Map; =20 + Map =3D NULL; + Urb =3D Ehc->Urb; Urb->Signature =3D EHC_URB_SIG; InitializeListHead (&Urb->UrbList); --=20 2.18.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49662): https://edk2.groups.io/g/devel/message/49662 Mute This Topic: https://groups.io/mt/39796126/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 19:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+49663+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49663+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1572444536; cv=none; d=zoho.com; s=zohoarc; b=V2U8K+stMz7onB/cOvLpti6C0jpERDTApd1gBQACkjIMwn/Xk5CpGmiulqtAmQFrlq251+KqMxIgjYmgFDW8bU39Ex9AnxjrymCdvNyRU2HeVSay3oajsFDbU0RNLYVqwY2qo/X3SACXyn+Fw1j/frlz9WxTMVSH94XYzDN9gkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572444536; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=yPYfu5WML98BR3o8IC8kRUnIA08agrz0/3AFXHN+N5w=; b=SbRzkqrPMnd0HCTTLiWZSrz0cW+0RFZciEM7CiR6ltK/N5uVnTGmSmL0xraR2N4n0gDSG4R4JjrT7WxIJv+3uQjy4pIcHLIi2kOhWNIu1Nw17Yl6x2kzF+3QzClVEew47GW50vPvroDC4CiAhnMUGbrLJkwWZ8NJ72oksPPXdhE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49663+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1572444536721812.0097742068092; Wed, 30 Oct 2019 07:08:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Wed, 30 Oct 2019 07:08:55 -0700 X-Received: from mga09.intel.com (mga09.intel.com []) by mx.groups.io with SMTP id smtpd.web09.5473.1572444518732196805 for ; Wed, 30 Oct 2019 07:08:42 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 07:08:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,247,1569308400"; d="scan'208";a="203890080" X-Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 30 Oct 2019 07:08:40 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Hao A Wu , Ray Ni Subject: [edk2-devel] [PATCH v2 2/3] MdeModulePkg/UhciPei: Initialize the variable RequestMap Date: Wed, 30 Oct 2019 22:08:29 +0800 Message-Id: <20191030140830.31156-3-shenglei.zhang@intel.com> In-Reply-To: <20191030140830.31156-1-shenglei.zhang@intel.com> References: <20191030140830.31156-1-shenglei.zhang@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,shenglei.zhang@intel.com X-Gm-Message-State: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1572444535; bh=5Iiwgf3MGZ+C8/P7QCFP4HKKvKW2Ur3tUO3yHqzKUZk=; h=Cc:Date:From:Reply-To:Subject:To; b=NdAGkBZ3OWzf5kemVSnqmTfPjM5yTUNK6y3YeDzS5Hadb20GesTPuZ28nV9TCYb+1U+ rXpqLOIOgHrK+vRnoXQJ3ZMNAUmxBOV29C7FuDX8yad9b7rSC2PAy8zChJRkUZEPlAGed qnChmg+lXxyHUw+f7KDbAKeg8pdGtcOpN5c= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" RequestMap is used but not Initialized. RequestMap is called by UhciMapUserRequest, in which RequestMap(Map) is called by IoMmuMap, and is finally called by IoMmu->Map. We can not assume RequestMap is given an initial value at any step. Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Shenglei Zhang Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c b/MdeModulePkg/Bus/Pci/= UhciPei/UhcPeim.c index b897c3f82ce6..a05834da3c4a 100644 --- a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c +++ b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c @@ -274,6 +274,8 @@ UhcControlTransfer ( =20 PktID =3D INPUT_PACKET_ID; =20 + RequestMap =3D NULL; + if (Request =3D=3D NULL || TransferResult =3D=3D NULL) { return EFI_INVALID_PARAMETER; } --=20 2.18.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49663): https://edk2.groups.io/g/devel/message/49663 Mute This Topic: https://groups.io/mt/39796153/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 19:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+49664+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49664+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1572444537; cv=none; d=zoho.com; s=zohoarc; b=Qd/xO28AMhc+qMnnTLQXYAaEBmw4xuFncQU33eSit94diqxpEuNBLjOpu+FOa7XzY4ljmI5owHW/ym8RuSX/2+SoC8P32ClgaMgP0bJgcmgRStvDEJOjqAH6hNXwGc7HgWmN1Nypl5abVHjsDbB7o/C49x30JzPBbSAIk11+bc4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572444537; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=OWVstq//t1JgTS/vDqIQf/kNm8TnUSkHysX5D51OfEE=; b=iKDZfP9el/gvpXkZzQFvAoYY/Zfr66dKUPWynUlQjhJ+YHa3QaQdIE5/wYJhj+6Iiq/D7XoRUGGCQ/2Pufsturm683WISzozDLQvLlGvMVcY3ubUkX/mmnQ4b3gDlPp+O7r+nU+GG4dG6wI/gOsuzwHsRbCkZqU0cuyvolx53SM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49664+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 157244453718543.88590717878674; Wed, 30 Oct 2019 07:08:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Wed, 30 Oct 2019 07:08:56 -0700 X-Received: from mga09.intel.com (mga09.intel.com []) by mx.groups.io with SMTP id smtpd.web09.5473.1572444518732196805 for ; Wed, 30 Oct 2019 07:08:43 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 07:08:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,247,1569308400"; d="scan'208";a="203890087" X-Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 30 Oct 2019 07:08:42 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Dandan Bi , Liming Gao Subject: [edk2-devel] [PATCH v2 3/3] MdeModulePkg/Mem: Initialize the variable MapMemory Date: Wed, 30 Oct 2019 22:08:30 +0800 Message-Id: <20191030140830.31156-4-shenglei.zhang@intel.com> In-Reply-To: <20191030140830.31156-1-shenglei.zhang@intel.com> References: <20191030140830.31156-1-shenglei.zhang@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,shenglei.zhang@intel.com X-Gm-Message-State: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1572444536; bh=hBjFPW/4jps8QQbQp+EN9wwniGpNcChz13bWNoBHWfk=; h=Cc:Date:From:Reply-To:Subject:To; b=kXIAD+EXSmE4yvHdF5BLR4fwoaiW3tBs9+SCOnNVlyuzT+V72EssOJIduy9oFYqTzqE ctPwNFakhFv6omhd7ISar2J1nV21OcoAFHfoKH+vYYI2OaTFcGQMRPfvIXKusKVvkmyGQ 7xczRPQpORm2CUZST6p0ZwevD9FHos7RH7k= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" MapMemory is not initialized by FindGuardedMemoryMap or CoreInternalAllocatePages which calls MapMemory. So we give a 0 to it. Cc: Dandan Bi Cc: Liming Gao Signed-off-by: Shenglei Zhang Reviewed-by: Dandan Bi --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/= Mem/HeapGuard.c index 9477b94044ba..b4cb48843fb7 100644 --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c +++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c @@ -225,6 +225,8 @@ FindGuardedMemoryMap ( UINTN BitsToUnitEnd; EFI_STATUS Status; =20 + MapMemory =3D 0; + // // Adjust current map table depth according to the address to access // --=20 2.18.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49664): https://edk2.groups.io/g/devel/message/49664 Mute This Topic: https://groups.io/mt/39796173/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-