lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGW2f1FTQss1JcWiajsJQ4_XK8rbKRrghvQP8s970gTX21g-Vw@mail.gmail.com>
Date:	Sat, 11 Jan 2014 20:08:29 +0000
From:	jon ernst <jonernst07@...il.com>
To:	"Theodore Ts'o" <tytso@....edu>
Cc:	"linux-ext4@...r.kernel.org List" <linux-ext4@...r.kernel.org>
Subject: Re: [1/1] handle e2image offset value better

On Sat, Jan 11, 2014 at 6:43 PM, Theodore Ts'o <tytso@....edu> wrote:
> On Sun, Jan 05, 2014 at 04:42:42AM +0000, jon ernst wrote:
>> current e2image cannot handle offset value as 0.
>>
>> For example,
>> e2image -aro   0 /dev/sda7 ~/e2image7
>> will return usage()
>> but
>> e2image -aro   1 /dev/sda7 ~/e2image7
>> is fine.
>
> I'm not seeing a problem;
>
>     cp /dev/null /tmp/foo.img
>     mke2fs -t ext4 -F /tmp/foo.img 100
>     e2image -aro 0 /tmp/foo.img /tmp/bar.img
>
Yes, agree. Actually I meant to send test like this:

e2image -aro 0 /tmp/foo.img

This will return usage(). As you mentioned, only "non-zero" argument
makes sense. I agree too.





> Is working just fine for me.
>
> Looking at your patch, I don't think it's correct.  We only want to go
> into "move mode" when the user has specified a single argument, and
> either the source or destination is non-zero, and of course this
> really only makes sense when we are in raw mode.
>
> That's what the code is currently doing.  If I were going to make any
> changes, I'd probably change the criteria so that we check to see if
> the source and destination offset is identical (since then it's just a
> no-op), and we should probably enforce the restriction that we only
> allow move mode when the user has specified both the -a and the -r
> option.  (Otherwise, they will destroy the data on their file system,
> which is probably not the result they were looking for.)

I tested, this restriction is there.

Thank you for your response.
Sorry for useless patch.

Jon
>
> Regards,
>
>                                                 - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ