qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: vintagepc404@protonmail.com
Subject: Re: [PATCH] usb-storage: tag usb_msd_csw as packed struct
Date: Mon, 6 Sep 2021 11:24:01 +0200	[thread overview]
Message-ID: <45538e19-8d9b-c91c-0a02-cd0f7df8e175@redhat.com> (raw)
In-Reply-To: <20210906045523.1259629-1-kraxel@redhat.com>

On 9/6/21 6:55 AM, Gerd Hoffmann wrote:
> Without this the struct has the wrong size: sizeof() evaluates
> to 16 instead of 13.  In most cases the bug is hidden by the
> fact that guests submits a buffer which is exactly 13 bytes
> long, so the padding added by the compiler is simply ignored.
> 
> But sometimes guests submit a larger buffer and expect a short
> transfer, which does not work properly with the wrong struct
> size.
> 
> Cc: vintagepc404@protonmail.com

Fixes: a917d384ac0 ("SCSI TCQ support.")

15 years old bug, nice =)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  include/hw/usb/msd.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)



      reply	other threads:[~2021-09-06  9:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06  4:55 [PATCH] usb-storage: tag usb_msd_csw as packed struct Gerd Hoffmann
2021-09-06  9:24 ` Philippe Mathieu-Daudé [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-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=45538e19-8d9b-c91c-0a02-cd0f7df8e175@redhat.com \
    --to=philmd@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vintagepc404@protonmail.com \
    /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).