From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 3C12321157FC5 for ; Wed, 26 Sep 2018 03:00:43 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 03:00:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,305,1534834800"; d="scan'208";a="76306033" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga008.jf.intel.com with ESMTP; 26 Sep 2018 03:00:41 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Sep 2018 03:00:25 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Sep 2018 03:00:24 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.140]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.37]) with mapi id 14.03.0319.002; Wed, 26 Sep 2018 17:59:38 +0800 From: "Zeng, Star" To: Ard Biesheuvel CC: "Ni, Ruiyu" , "Tian, Feng" , "Wang, Fei1" , Grzegorz Jaszczyk , "edk2-devel@lists.01.org" , Nadav Haklai , "Gao, Liming" , "Kinney, Michael D" , "Zeng, Star" Thread-Topic: [edk2] [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee Thread-Index: AQHUVRrj3JZY/U1VX0q9DLGxaCLsk6UBtbhAgAABiED///aqAIAApxUQ Date: Wed, 26 Sep 2018 09:59:38 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BBF0A4A@shsmsx102.ccr.corp.intel.com> References: <1537912671-20013-1-git-send-email-mw@semihalf.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BBEF22F@shsmsx102.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BBEF254@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 10:00:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Good news. -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard = Biesheuvel Sent: Wednesday, September 26, 2018 4:01 PM To: Zeng, Star Cc: Ni, Ruiyu ; Tian, Feng ; Wang,= Fei1 ; Grzegorz Jaszczyk ; edk2-dev= el@lists.01.org; Nadav Haklai ; Gao, Liming ; Kinney, Michael D Subject: Re: [edk2] [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memor= y access in XhcSetHsee On Wed, 26 Sep 2018 at 02:36, Zeng, Star wrote: > > Just pushed it at e5cd809087e5710e019d2766fab13c59a2e2ac28. > Really thanks. > FYI this patch fixes the issue with my PCIe Renesas uPD70201 XHCI controlle= r as well. > -----Original Message----- > From: Zeng, Star > Sent: Wednesday, September 26, 2018 8:30 AM > To: Marcin Wojtas ; edk2-devel@lists.01.org > Cc: Tian, Feng ; Kinney, Michael D=20 > ; Gao, Liming ;=20 > leif.lindholm@linaro.org; ard.biesheuvel@linaro.org;=20 > nadavh@marvell.com; jsd@semihalf.com; jaz@semihalf.com; Ni, Ruiyu=20 > ; Wang, Fei1 ; Zeng, Star=20 > > Subject: RE: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory=20 > access in XhcSetHsee > > Good observation. > > Reviewed-by: Star Zeng > > > Thanks, > Star > -----Original Message----- > From: Marcin Wojtas [mailto:mw@semihalf.com] > Sent: Wednesday, September 26, 2018 5:58 AM > To: edk2-devel@lists.01.org > Cc: Tian, Feng ; Kinney, Michael D=20 > ; Gao, Liming ;=20 > leif.lindholm@linaro.org; ard.biesheuvel@linaro.org;=20 > nadavh@marvell.com; mw@semihalf.com; jsd@semihalf.com;=20 > jaz@semihalf.com; Ni, Ruiyu ; Wang, Fei1=20 > ; Zeng, Star > Subject: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory=20 > access in XhcSetHsee > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1206 > > Newly added XhcSetHsee() routine reads 4 bytes into a UINT16 variable cau= sing issues on PCIE and NonDiscoverable Xhci controllers. Fix that. > > Cc: Ruiyu Ni > Cc: Fei1 Wang > Cc: Star Zeng > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marcin Wojtas > --- > MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c=20 > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c > index 89f073e..3ed1a55 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c > @@ -609,7 +609,7 @@ XhcSetHsee ( > PciIo, > EfiPciIoWidthUint16, > PCI_COMMAND_OFFSET, > - sizeof (XhciCmd), > + sizeof (XhciCmd) / sizeof (UINT16), > &XhciCmd > ); > if (!EFI_ERROR (Status)) { > -- > 2.7.4 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel