All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PULL 4/4] qemu-img: improve queue depth validation in img_bench
Date: Tue, 13 May 2025 17:06:39 +0200	[thread overview]
Message-ID: <aCNf_6rx07U6Qmgm@redhat.com> (raw)
In-Reply-To: <45fec2ac-9c59-4fe9-b750-8d04aa3e473f@tls.msk.ru>

Am 28.04.2025 um 15:58 hat Michael Tokarev geschrieben:
> 28.04.2025 16:54, Michael Tokarev пишет:
> > 25.04.2025 20:52, Kevin Wolf wrote:
> > > From: Denis Rastyogin <gerben@altlinux.org>
> > > 
> > > This error was discovered by fuzzing qemu-img.
> > > 
> > > Currently, running `qemu-img bench -d 0` in img_bench is allowed,
> > > which is a pointless operation and causes qemu-img to hang.
> > > 
> > > Signed-off-by: Denis Rastyogin <gerben@altlinux.org>
> > > Message-ID: <20250327162423.25154-5-gerben@altlinux.org>
> > > Reviewed-by: Kevin Wolf <kwolf@redhat.com>
> > > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > > ---
> > >   qemu-img.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/qemu-img.c b/qemu-img.c
> > > index 2044c22a4c..76ac5d3028 100644
> > > --- a/qemu-img.c
> > > +++ b/qemu-img.c
> > > @@ -4571,7 +4571,7 @@ static int img_bench(int argc, char **argv)
> > >           {
> > >               unsigned long res;
> > > -            if (qemu_strtoul(optarg, NULL, 0, &res) < 0 || res > INT_MAX) {
> > > +            if (qemu_strtoul(optarg, NULL, 0, &res) <= 0 || res > INT_MAX) {
> > >                   error_report("Invalid queue depth specified");
> > >                   return 1;
> > >               }
> > 
> > FWIW, it's been covered by my qemu-img options patches for way over a year.
> 
> In particular:
> 
> https://lore.kernel.org/qemu-devel/20240927061121.573271-28-mjt@tls.msk.ru/
> 
> I'm still waiting for some feedback from these patches - heard neither ACK
> nor NACK for this rather large work.

Oops, seems I never continued review after patch 5. I'll get back to it.

However, I don't see the above hunk in that series. Am I missing it or
is there another series of yours waiting for review?

Kevin



  reply	other threads:[~2025-05-13 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 17:52 [PULL 0/4] Block layer patches Kevin Wolf
2025-04-25 17:52 ` [PULL 1/4] file-posix: probe discard alignment on Linux block devices Kevin Wolf
2025-04-25 17:52 ` [PULL 2/4] block/io: skip head/tail requests on EINVAL Kevin Wolf
2025-04-25 17:52 ` [PULL 3/4] block: Remove unused callback function *bdrv_aio_pdiscard Kevin Wolf
2025-04-25 17:52 ` [PULL 4/4] qemu-img: improve queue depth validation in img_bench Kevin Wolf
2025-04-28 13:54   ` Michael Tokarev
2025-04-28 13:58     ` Michael Tokarev
2025-05-13 15:06       ` Kevin Wolf [this message]
2025-05-14  9:28         ` Michael Tokarev
2025-05-14  9:31           ` Michael Tokarev
2025-04-28 17:56 ` [PULL 0/4] Block layer patches Stefan Hajnoczi

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=aCNf_6rx07U6Qmgm@redhat.com \
    --to=kwolf@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-block@nongnu.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.