All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Stefan Ring <stefanrin@gmail.com>,
	"Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/5] xfs_metadump: Zap multi fsb blocks
Date: Fri, 4 Jan 2019 17:11:49 -0600	[thread overview]
Message-ID: <704cb245-cc28-5c98-0418-e92b84d20f22@sandeen.net> (raw)
In-Reply-To: <CAAxjCEytZ4U8K6CPJFBguTSocH_bmxxoEvZ-HkZuFc=QwrZbBQ@mail.gmail.com>

On 1/4/19 4:27 PM, Stefan Ring wrote:
> On Thu, Jan 3, 2019 at 6:55 PM Darrick J. Wong <darrick.wong@oracle.com> wrote:
>> On Mon, Nov 05, 2018 at 10:31:42PM +0100, Stefan Ring wrote:
>>> Using basically the same code as in process_single_fsb_objects.
>>>
>>> Signed-off-by: Stefan Ring <stefanrin@gmail.com>
>>> ---
>>>  db/metadump.c | 19 ++++++++++++-------
>>>  1 file changed, 12 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/db/metadump.c b/db/metadump.c
>>> index 97d2a490..be7cf360 100644
>>> --- a/db/metadump.c
>>> +++ b/db/metadump.c
>>> @@ -1921,15 +1922,19 @@ process_multi_fsb_objects(
>>>
>>>                       }
>>>
>>> -                     if ((!obfuscate && !zero_stale_data) ||
>>
>> Hmmm, if we're not obfuscating or zeroing data, can we still jump to
>> write_buf()?
>>
>> --D
> 
> The call to write_buf() is always necessary, as without this, nothing
> would end up in the metadump. But while trying to argue the soundness
> of this patch, I have found deficiencies ;). It will always call
> process_dir_data_block, even without any zeroing/obfuscation flags
> set.

Right, I think that was Darrick's point.  (I had noticed this too but
have been woefully slow in replying.)

> I must have considered this harmless, since it does not actually
> "do" anything, but I'm not so sure anymore because it may complain
> about data inconsistencies, and this might make an otherwise dumpable
> image non-dumpable.

Yup, exactly.  You're good!  ;)

> It is also, at least in theory, able to reset the
> need_crc back to zero, contrary to all the other usages of this flag
> in this file. I don't think this is an actual problem, as the flag
> only seems to be set when zeroing or obfuscating in the first place,
> but it might become one if circumstances far removed from this
> location change. It is just too much of a mental burden.

I feel like the whole need_crc business could be cleaned up, TBH (later).

> I will redo this once again so that it will be more similar in
> structure to the code in process_single_fsb_objects _and_ the original
> code, I hope.

FWIW, I've been running all of xfstests in various permutations with a patch
to dump and restore and xfs_repair an image after each run, using each of
"" "-o" "-a" and "-oa" as metadump arguments.  Some corruptions have
appeared, but I don't yet know if they're regressions or not.
(i.e. the filesystem was intact but the restored metadump was not.)

I'll let the run finish and re-run the failed tests w/ stock code and see
what I find.

-Eric

  reply	other threads:[~2019-01-04 23:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 21:31 [PATCH v5 0/5] Try to squash metadump data leaks Stefan Ring
2018-11-05 21:31 ` [PATCH 1/5] xfs_metadump: Extend data zapping to XFS_DIR{2,3}_LEAFN_MAGIC blocks Stefan Ring
2018-12-20 22:20   ` Eric Sandeen
2018-11-05 21:31 ` [PATCH 2/5] xfs_metadump: Zap multi fsb blocks Stefan Ring
2019-01-03 17:55   ` Darrick J. Wong
2019-01-04 22:27     ` Stefan Ring
2019-01-04 23:11       ` Eric Sandeen [this message]
2018-11-05 21:31 ` [PATCH 3/5] xfs_metadump: Zap freeindex blocks in directory inodes Stefan Ring
2019-01-03 17:59   ` Darrick J. Wong
2018-11-05 21:31 ` [PATCH 4/5] xfs_metadump: Zap unused space in inode btrees Stefan Ring
2019-01-03 17:57   ` Darrick J. Wong
2018-11-05 21:31 ` [PATCH 5/5] xfs_metadump: Zap dev inodes Stefan Ring
2019-01-03 17:57   ` Darrick J. Wong
2018-12-06 17:04 ` [PATCH v5 0/5] Try to squash metadump data leaks Stefan Ring
2018-12-06 20:23   ` Eric Sandeen
2019-01-07 20:13 ` [PATCH v6 " Stefan Ring
2019-01-07 20:13   ` [PATCH 1/5] xfs_metadump: Extend data zapping to XFS_DIR{2,3}_LEAFN_MAGIC blocks Stefan Ring
2019-01-07 20:13   ` [PATCH 2/5] xfs_metadump: Zap multi fsb blocks Stefan Ring
2019-01-11 17:31     ` Eric Sandeen
2019-01-14 17:42       ` Stefan Ring
2019-01-14 17:46         ` Eric Sandeen
2019-01-07 20:13   ` [PATCH 3/5] xfs_metadump: Zap freeindex blocks in directory inodes Stefan Ring
2019-01-07 20:13   ` [PATCH 4/5] xfs_metadump: Zap unused space in inode btrees Stefan Ring
2019-01-07 20:13   ` [PATCH 5/5] xfs_metadump: Zap dev inodes Stefan Ring
  -- strict thread matches above, loose matches on Subject: below --
2018-10-26 20:19 [PATCH 0/5] v4 Try to squash metadump data leaks Stefan Ring
2018-10-26 20:19 ` [PATCH 2/5] xfs_metadump: Zap multi fsb blocks Stefan Ring

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=704cb245-cc28-5c98-0418-e92b84d20f22@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=stefanrin@gmail.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 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.