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]
Date:	Tue, 8 Jan 2008 20:47:58 -0700
From:	Andreas Dilger <adilger@....com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	ext4 development <linux-ext4@...r.kernel.org>,
	Alex Tomas <alex@...sterfs.com>
Subject: Re: [PATCH] UPDATED3: types fixup for mballoc

On Jan 08, 2008  13:54 -0600, Eric Sandeen wrote:
> Note, the calculations Andreas & I were discussing only work properly
> for stripe <= blocks per group... I don't know if we'd need to enforce
> that at mount time?

I think that would be prudent, but can be done in a separate patch.
If the RAID stripe width is so large that one has to do read-modify-write
for a whole group write (8MB @ 1kB blocksize, 128MB @ 4kB blocksize)
then I don't think we can use that to align allocations.

I think Aneesh might be working on getting s_raid_stripe_width from the
superblock, and we may as well do the sanity checking in the same patch.
If sb->s_raid_stripe_width > EXT4_BLOCKS_PER_GROUP, then as a fallback
I'd suggest using sb->s_raid_stride if < EXT4_BLOCKS_PER_GROUP, or just
ignoring both if unsuitable.

> I ran into a potential overflow in ext4_mb_scan_aligned, 
> and went looking for others in mballoc.  This patch hits a 
> few spots, compile-tested only at this point, comments welcome.
> 
> This patch:
> 
> changes fe_len to an int, I don't think we need it to be a long,
> looking at how it's used (should it be a grpblk_t?)  Also change
> anything assigned to return value of mb_find_extent, since it returns
> fe_len.
> 
> changes anything that does groupno * EXT4_BLOCKS_PER_GROUP
> or pa->pa_pstart + <whatever> to an ext4_fsblk_t
> 
> avoids 64-bit divides & modulos, and...
> 
> fixes up any related formats
> 
> Signed-off-by: Eric Sandeen <sandeen@...hat.com>

You can add a "Signed-off-by: Andreas Dilger <adilger@....com>" too.
The revised calcs look good to me.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

-
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