From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::142; helo=mail-it1-x142.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x142.google.com (mail-it1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 12DEF21962301 for ; Wed, 26 Sep 2018 01:01:37 -0700 (PDT) Received: by mail-it1-x142.google.com with SMTP id p129-v6so1654449ite.3 for ; Wed, 26 Sep 2018 01:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TR0oWiYJzS6gIP9qy0p6jen8zcUsSVgSOfbLzbO7wcA=; b=AQjIfKenNFx86QVcyshLAdcDfkPcegiVuBmwo4pqJghZtCzWcUmycvxs6dtuQySTOC FFB1eh/nh2eb9c8P8axPGCaUTLd9k+xNLkrMiaAQ8OSWIc5sF8mBd/caAyRMlFDtq2aC zquALLSs7Kx9VN1yXYyYgrsmLtXeIUpl59YF4= 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=TR0oWiYJzS6gIP9qy0p6jen8zcUsSVgSOfbLzbO7wcA=; b=e7ATK2dh9bFPaJLsi1MmK9/KoKB5k5Vc/WepgUfvK0O3GdA8nDmGG126qACYKEbihI fm6l43lNRHA5/ZYLw77xBPE2CnoNuFhyrcYs6npFN3AFo/2Sdk8JkJGMILkEHsHmmbQm pNvv7NuVmg//TOtjXqr5ZyaMkITVPDUbe8mRE0UZ5tFs2ofwRxb87z+YjBiAEynYtnXX LFG3/O33oVrBDwYW0s4H+D1XPM0AMTkgl7OZL/bmW/sjfNdYO9k5p/V4OaA8Ub+LKF4+ OFmzsMFHLh37ZB+IwKUoBAZwPT2yhp/f28K/C/02TWJhR5C61mQrBVpITo1R3nxhHids lBAA== X-Gm-Message-State: ABuFfog0AJbUCQ629b6yhY6bmoe9qsG4K7P8MNUv2R06iMLRHhmpA5kq 8Wq8XUhrxirQFixLWNNuQGBH08kDSV0W2hnroolVuA== X-Google-Smtp-Source: ACcGV6328ASDoNNpamiIrDX52MmVUtxRVnbMFGn/gw1hUKOjyx7EePawRpp3owxrPKgAoFLqYN5+eKDTd+nEli+Yask= X-Received: by 2002:a02:b015:: with SMTP id p21-v6mr4528322jah.2.1537948896901; Wed, 26 Sep 2018 01:01:36 -0700 (PDT) MIME-Version: 1.0 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: <0C09AFA07DD0434D9E2A0C6AEB0483103BBEF254@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Wed, 26 Sep 2018 10:01:24 +0200 Message-ID: To: "Zeng, Star" Cc: Marcin Wojtas , "edk2-devel@lists.01.org" , "Tian, Feng" , "Kinney, Michael D" , "Gao, Liming" , Leif Lindholm , Nadav Haklai , =?UTF-8?B?SmFuIETEhWJyb8Wb?= , Grzegorz Jaszczyk , Ruiyu Ni , fei1.wang@intel.com 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 08:01:38 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 controller 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 ; Gao, Liming ; leif.lindholm@linaro.org; = ard.biesheuvel@linaro.org; nadavh@marvell.com; jsd@semihalf.com; jaz@semiha= lf.com; Ni, Ruiyu ; Wang, Fei1 ; Z= eng, Star > Subject: RE: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory acc= ess 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 ; Gao, Liming ; leif.lindholm@linaro.org; = ard.biesheuvel@linaro.org; nadavh@marvell.com; mw@semihalf.com; jsd@semihal= f.com; jaz@semihalf.com; Ni, Ruiyu ; Wang, Fei1 ; Zeng, Star > Subject: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory 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 b/MdeModulePkg/Bus/Pc= i/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 >