public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Marcin Wojtas <mw@semihalf.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"Tian, Feng" <feng.tian@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Leif Lindholm" <leif.lindholm@linaro.org>,
	"Nadav Haklai" <nadavh@marvell.com>,
	"Jan Dąbroś" <jsd@semihalf.com>,
	"Grzegorz Jaszczyk" <jaz@semihalf.com>,
	"Ruiyu Ni" <ruiyu.ni@intel.com>,
	fei1.wang@intel.com, "Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
Date: Tue, 25 Sep 2018 20:29:46 +0200	[thread overview]
Message-ID: <CAKv+Gu-xj7EbyAXi+MKJt5fsBawX-xvF+1ZzE3t2C=2pwqBUAQ@mail.gmail.com> (raw)
In-Reply-To: <1537898313-1767-1-git-send-email-mw@semihalf.com>

On Tue, 25 Sep 2018 at 19:59, Marcin Wojtas <mw@semihalf.com> wrote:
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1206
>
> Newly added XhcSetHsee() routine reads 4 bytes into
> a UINT16 variable causing issues on PCIE and NonDiscoverable
> Xhci controllers. Fix that.
>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Fei1 Wang <fei1.wang@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> ---
>  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/Pci/XhciDxe/XhciReg.c
> index 89f073e..dfe5f6c 100644
> --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c
> +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c
> @@ -607,7 +607,7 @@ XhcSetHsee (
>    PciIo = Xhc->PciIo;
>    Status = PciIo->Pci.Read (
>                          PciIo,
> -                        EfiPciIoWidthUint16,
> +                        EfiPciIoWidthUint8,
>                          PCI_COMMAND_OFFSET,
>                          sizeof (XhciCmd),
>                          &XhciCmd
> --
> 2.7.4
>

Well spotted! But I think a single read of 16 bits is more appropriate
here though.


      reply	other threads:[~2018-09-25 18:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 17:58 [PATCH] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee Marcin Wojtas
2018-09-25 18:29 ` Ard Biesheuvel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKv+Gu-xj7EbyAXi+MKJt5fsBawX-xvF+1ZzE3t2C=2pwqBUAQ@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox