From: Alexander Graf <agraf@suse.de>
To: qemu-devel@nongnu.org
Cc: Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] [PATCH] Fix ATAPI GET_CONFIGURATION function
Date: Mon, 26 May 2008 19:46:10 +0200 [thread overview]
Message-ID: <95BCB73C-1AA6-4EA8-836F-C19461CC050D@suse.de> (raw)
In-Reply-To: <20080525103837.GA16584@tapir>
On May 25, 2008, at 12:38 PM, Carlo Marcelo Arenas Belon wrote:
> Alexander
>
> sorry if I wasn't clear enough. I wasn't arguing about your patch
> (which is
> correct) but was trying to explain why the old implementation was
> done the way
> it was, in an (obviously excessive) effort to prevent a buffer
> overflow for the
> response (which used to be hardcoded to 32 bytes regardless of the
> size of the
> buffer) as shown by :
>
> http://svn.savannah.gnu.org/viewvc/trunk/hw/ide.c?root=qemu&r1=3147&r2=3161
>
> a slightly modified version of your patch (which I'd been using
> against kvm
> and validated correct with Linux and Solaris guests) attached.
>
> the only difference, is that it handles explicitly the empty buffer
> case and
> cleans up the len calculation which shouldn't had been calculated
> conditionally as you pointed out.
>
> Carlo
> <kvm-69-qemu-ide-dvdrom.patch>
Hum ... it might be a good idea to inline patches so commenting on
them is easier.
You don't need to check for max_len > 0, because if max_len == 0 the
packet will be truncated back to 0 bytes by ide_atapi_cmd_reply(s,
len, max_len).
Alex
next prev parent reply other threads:[~2008-05-26 17:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 14:34 [Qemu-devel] [PATCH] Fix ATAPI GET_CONFIGURATION function Alexander Graf
2008-05-24 10:31 ` Alexander Graf
2008-05-24 19:54 ` Alexander Graf
2008-05-25 7:53 ` Carlo Marcelo Arenas Belon
2008-05-25 9:27 ` Alexander Graf
2008-05-25 10:38 ` Carlo Marcelo Arenas Belon
2008-05-26 8:59 ` Alexander Graf
2008-05-26 17:46 ` Alexander Graf [this message]
2008-05-27 18:10 ` Carlo Marcelo Arenas Belon
2008-05-30 1:32 ` Alexander Graf
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=95BCB73C-1AA6-4EA8-836F-C19461CC050D@suse.de \
--to=agraf@suse.de \
--cc=paul@codesourcery.com \
--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).