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] [thread-next>] [day] [month] [year] [list]
Message-Id: <04C1B12A-A408-4BC8-B419-C93934141071@whamcloud.com>
Date:	Fri, 16 Mar 2012 21:07:34 -0600
From:	Andreas Dilger <adilger@...mcloud.com>
To:	Ted Ts'o <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] libext2fs: add new test: tst_inode_size

On 2011-09-14, at 4:15 PM, Ted Ts'o wrote:
> On Wed, Sep 14, 2011 at 02:47:08PM -0600, Andreas Dilger wrote:
>> One thing I noticed with this check_field() macro is that it doesn't
>> actually detect the case if the size of a field is changed.  This hit
>> me when I was making a cleanup to the large journal patch which renamed
>> s_jnl_blocks[15] to s_jnl_size_lo and s_jnl_blocks[16] to s_jnl_size_hi
>> for clarity.  The tst_super_size test passed just fine, but the e2fsck
>> test scripts failed in weird and wonderful ways.
>> 
>> A better solution might be to explicitly pass the expected field size
>> instead of getting both the size and offset from the structure itself.
>> Since these structures change very rarely it isn't much maintenance,
>> but it would be lousy if code was released that had some incorrect
>> field offset because someone increased or decreased an earlier field
>> without thinking enough, and those fields weren't used in normal tests.
>> 
>> I can submit a patch if you are interested.
> 
> Good point.  Yes, I agree it would be worth while to do this.

Finally had a few minutes to sit down and work on this.  Patch
attached, since I'm offline right now.

Cheers, Andreas
--
Andreas Dilger                       Whamcloud, Inc.
Principal Lustre Engineer            http://www.whamcloud.com/




Download attachment "0001-tests-add-field-sizes-to-inode-super-struct-tests.patch" of type "application/octet-stream" (11981 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ