qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Cord Amfmgm <dmamfmgm@gmail.com>, Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT
Date: Wed, 8 May 2024 10:44:55 +0200	[thread overview]
Message-ID: <e70a8a3f-9c87-4b71-a1ae-bfc1d64b37c5@redhat.com> (raw)
In-Reply-To: <CACBuX0SUvsip=hj5NbE3g5gCxSmdRKbK-k=ZQz819TDEfvtXgw@mail.gmail.com>

On 07/05/2024 22.20, Cord Amfmgm wrote:
> 
> 
> On Wed, Apr 24, 2024 at 3:43 PM Cord Amfmgm <dmamfmgm@gmail.com 
> <mailto:dmamfmgm@gmail.com>> wrote:
> 
>     On Thu, Apr 18, 2024 at 10:43 AM Michael Tokarev <mjt@tls.msk.ru
>     <mailto:mjt@tls.msk.ru>> wrote:
> 
>         06.02.2024 10:13, Cord Amfmgm wrote:
>          > This changes the ohci validation to not assert if invalid
>          > data is fed to the ohci controller. The poc suggested in
>          > https://bugs.launchpad.net/qemu/+bug/1907042
>         <https://bugs.launchpad.net/qemu/+bug/1907042>
>          > and then migrated to bug #303 does the following to
>          > feed it a SETUP pid and EndPt of 1:
>          >
>          >          uint32_t MaxPacket = 64;
>          >          uint32_t TDFormat = 0;
>          >          uint32_t Skip = 0;
>          >          uint32_t Speed = 0;
>          >          uint32_t Direction = 0;  /* #define OHCI_TD_DIR_SETUP 0 */
>          >          uint32_t EndPt = 1;
>          >          uint32_t FuncAddress = 0;
>          >          ed->attr = (MaxPacket << 16) | (TDFormat << 15) | (Skip
>         << 14)
>          >                     | (Speed << 13) | (Direction << 11) | (EndPt
>         << 7)
>          >                     | FuncAddress;
>          >          ed->tailp = /*TDQTailPntr= */ 0;
>          >          ed->headp = ((/*TDQHeadPntr= */ &td[0]) & 0xfffffff0)
>          >                     | (/* ToggleCarry= */ 0 << 1);
>          >          ed->next_ed = (/* NextED= */ 0 & 0xfffffff0)
>          >
>          > qemu-fuzz also caught the same issue in #1510. They are
>          > both fixed by this patch.
>          >
>          > The if (td.cbp > td.be <http://td.be>) logic in ohci_service_td()
>         causes an
>          > ohci_die(). My understanding of the OHCI spec 4.3.1.2
>          > Table 4-2 allows td.cbp to be one byte more than td.be
>         <http://td.be> to
>          > signal the buffer has zero length. The new check in qemu
>          > appears to have been added since qemu-4.2. This patch
>          > includes both fixes since they are located very close
>          > together.
>          >
>          > Signed-off-by: David Hubbard <dmamfmgm@gmail.com
>         <mailto:dmamfmgm@gmail.com>>

Your Signed-off-by line does not match the From: line ... could you please 
fix this? (see 
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#patch-emails-must-include-a-signed-off-by-line 
, too)

>         Wonder if this got lost somehow.  Or is it not needed?
> 
>         Thanks,
> 
>         /mjt
> 
> 
>     Friendly ping! Gerd, can you chime in with how you would like to
>     approach this? I still need this patch to unblock my qemu workflow -
>     custom OS development.
> 
> 
> Can I please ask for an update on this? I'm attempting to figure out if this 
> patch has been rejected and I need to resubmit / rework it at HEAD?

Looks like it's hard to find someone who still can review OHCI patches these 
days...

Anyway, I tried to get the reproducer running that had been added to the 
original patch (installed an Ubuntu 18.04 guest and compiled and ran that 
ohci_poc program in it), but so far, I failed. Could you please provide 
detailed steps how you can still produce this issue with the latest version 
of QEMU, please?

  Thanks,
   Thomas




  reply	other threads:[~2024-05-08  8:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06  7:13 hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT Cord Amfmgm
2024-04-18 15:43 ` Michael Tokarev
2024-04-19 15:00   ` Cord Amfmgm
2024-04-24 20:43   ` Cord Amfmgm
2024-05-07 20:20     ` Cord Amfmgm
2024-05-08  8:44       ` Thomas Huth [this message]
2024-05-08  9:53       ` Philippe Mathieu-Daudé
2024-05-08 15:28         ` Cord Amfmgm
2024-05-09  0:32           ` Cord Amfmgm
2024-05-09 17:48           ` Peter Maydell
2024-05-09 18:16             ` Cord Amfmgm
2024-05-09 20:37               ` BALATON Zoltan
2024-05-10  7:08                 ` Cord Amfmgm
2024-05-11 10:25               ` Peter Maydell
2024-05-12 16:24                 ` Cord Amfmgm
2024-05-20 17:04 ` Peter Maydell
2024-05-20 22:24   ` Cord Amfmgm
2024-05-28 14:03     ` Peter Maydell
2024-05-28 15:37       ` Cord Amfmgm
2024-05-28 16:32         ` Peter Maydell
2024-05-30  4:54           ` Cord Amfmgm
2024-05-30  8:33             ` Alex Bennée
2024-05-30 16:03               ` Cord Amfmgm
2024-05-30 19:12                 ` Alex Bennée
2024-05-30 21:11                   ` Cord Amfmgm
  -- strict thread matches above, loose matches on Subject: below --
2024-02-06  7:02 Cord Amfmgm
2024-02-06  7:05 ` Cord Amfmgm

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-all 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=e70a8a3f-9c87-4b71-a1ae-bfc1d64b37c5@redhat.com \
    --to=thuth@redhat.com \
    --cc=dmamfmgm@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).