From: Christoph Hellwig <hch@infradead.org>
To: Richard Wareing <rwareing@fb.com>
Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH v3] xfs: Add test for CVE-2017-14340
Date: Thu, 21 Sep 2017 06:42:42 -0700 [thread overview]
Message-ID: <20170921134242.GA26627@infradead.org> (raw)
In-Reply-To: <20170920004650.36174-1-rwareing@fb.com>
> +_require_xfs_io_command "chattr"
> +_require_xfs_io_command "fsync"
> +_require_xfs_io_command "pwrite"
I think we expect these always to be there in general. But then
again these checks won't hurt either.
> +_require_test
I can't see the test using the test device, so this should not be
needed.
> +# Set realtime inherit flag on scratch mount, suppress output
> +# as this may simply error out on future kernels, we will check
> +# exit code instead.
> +$XFS_IO_PROG -c 'chattr +t' $SCRATCH_MNT &> /dev/null
> +chattr_ret=$?
> +
> +# Erroring out here is fine, this would be desired behavior for
> +# FSes without realtime devices present.
> +if (( chattr_ret == 0)); then
Don't want to be nitpicky, but the way we usuall write this would be:
$XFS_IO_PROG -c 'chattr +t' $SCRATCH_MNT &> /dev/null
if [ $? -eq 0 ]; then
> +rm -f $SCRATCH_MNT/testfile
We probably don't need to beother with this, as the scratch device
gets reinitialized on every test that uses it.
Otherwise the test looks great, thanks a lot!
Reviewed-by: Christoph Hellwig <hch@lst.de>
prev parent reply other threads:[~2017-09-21 13:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 0:46 [PATCH v3] xfs: Add test for CVE-2017-14340 Richard Wareing
2017-09-21 13:42 ` Christoph Hellwig [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=20170921134242.GA26627@infradead.org \
--to=hch@infradead.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=rwareing@fb.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).