Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Steven Lang <tirea@google.com>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: [PATCH] Cleanup option keyword/environment substitution
Date: Fri, 28 Oct 2011 08:34:31 +0200	[thread overview]
Message-ID: <4EAA4CF7.8030009@kernel.dk> (raw)
In-Reply-To: <CAAUT-yNorwr8cyuzpDuV9GW_n2yeuMvtTE_mgMkONMgSZLvZrg@mail.gmail.com>

On 2011-10-28 02:17, Steven Lang wrote:
> Right now the substitution for options seems quite fragile.  Among the
> issues...

That's definitely true, it was a quick hack that never got the 2nd round
of look over it should have had. So thanks for doing this!

> - If bc had an error and returned no output, it caused a NULL reference
> - Multiple variable substitutions (For example $ncpus * $pagesize)
> caused an error as it tried to run bc after the first, with the second
> still text
> - Memory leak for every keyword substituted
> - Multiplication caused shell wildcard expansion (*) of the current
> directory when passing the input to bc
> - Shell escape sequences would be parsed on the command line when bc is called
> - Potential buffer overrun due to unchecked lengths on the input line
> 
> So I did a little cleanup to get rid of the issues.  This patch also
> moves the environment variable substitution to run before the keyword
> substitution, so an environment variable can now indirectly perform a
> keyword substitution.

Thanks, applied to both master and stable-1.x.

-- 
Jens Axboe


      reply	other threads:[~2011-10-28  6:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28  0:17 [PATCH] Cleanup option keyword/environment substitution Steven Lang
2011-10-28  6:34 ` Jens Axboe [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=4EAA4CF7.8030009@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=tirea@google.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