From: Dave Chinner <david@fromorbit.com>
To: Mark Tinguely <tinguely@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs_db: fix the setting of unaligned directory fields
Date: Sat, 8 Feb 2014 19:30:12 +1100 [thread overview]
Message-ID: <20140208083012.GI13647@dastard> (raw)
In-Reply-To: <52F56891.5020305@sgi.com>
On Fri, Feb 07, 2014 at 05:13:21PM -0600, Mark Tinguely wrote:
> On 02/07/14 16:33, Dave Chinner wrote:
> >On Fri, Feb 07, 2014 at 04:03:42PM -0600, Mark Tinguely wrote:
> >>@@ -526,16 +527,20 @@ convert_arg(
> >> */
> >> *value = strtoll(arg, NULL, 0);
> >
> >If we are touching this code, the return value here should be error
> >checked.
> >
> >xfs_db> write u3.bmx[0].startblock 3rgfdw
> >u3.bmx[0].startblock = 52776558133248
>
> hmm, It should stop at 3. I will take a look.
Even if it stops at 3, that's still wrong because it's failed to
process the entire user input....
> >xfs_db> write u3.bmx[0].startblock x3rgfdw
> >u3.bmx[0].startblock = 0
> >xfs_db>
> >
> >i.e. it accepts garbage rather than erroring out.
>
> as does all the other writes ...
> xfs_db> write core.nblocks x3rgfdw
> core.nblocks = 0
>
> Fixing convert_arg() is beyond the scope of just this patch.
Sure, but I'm not asking you to fix all of convert_args in this
patch, just asking you to do a complete job of fixing the bitval
input processing in this patch.
But, seeing as you've raised that convert_args() has other broken
paths, can you also write new patches to address those issues? It
won't take you long while all this code is fresh in your mind, and
if you do it now it won't get dropped on the floor until somebody
else hits it a couple of years down the track...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-08 8:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 22:03 [PATCH] xfs_db: fix the setting of unaligned directory fields Mark Tinguely
2014-02-07 22:33 ` Dave Chinner
2014-02-07 23:13 ` Mark Tinguely
2014-02-08 8:30 ` Dave Chinner [this message]
2014-02-08 17:30 ` Mark Tinguely
2014-02-09 23:22 ` Dave Chinner
2014-02-10 14:23 ` Mark Tinguely
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=20140208083012.GI13647@dastard \
--to=david@fromorbit.com \
--cc=tinguely@sgi.com \
--cc=xfs@oss.sgi.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