Skip to contentSkip to conversation

2/6 Detect overflows in loop counters

PATCH Theodore Tso 2 participants 4 messages Aug 30, 2006 – Sep 12, 2006 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

First post! (Note new mailing list)

Quoted 2 lines · Eric Sandeen

I've respun & refactored the remaining patches against the mercurial repo, and put changelog entries in...

Thanks, I appreciate it!

- Ted

#4 lore raw

Comments on respun 16T patches: group_desc_loops

In reply to a message not in the archive
Quoted 1 line · Eric Sandeen

http://people.redhat.com/esandeen/ext3/e2fsprogs-1.39-16T/e2fsprogs-hg-20060830-16T-patches.tar.gz

In the group_desc_loops patches in the above tarball:

Quoted 6 lines

For loops iterating over all group descriptors, consistently define first_block and last_block in a way that they are inclusive of the range, and do not overflow.

Previously on the last block group we did a test of <= first + dec_blocks; this would actually wrap back to 0 for a total block count of 2^32-1

As far as I can tell this is not a problem. sb->s_last_block can be at most 2**32-1 --- which means that the last valid block number is actually 2**32-2, since block numbers are zero based.

So as long as the handling of the last block group is correct, I don't think we actually need to make the <= to < change. It's not wrong to make the change, just not necessary as far as I can see. Also, there are some files for which the only change was variable names. That's fine, but the changelogs should state that.

So there is a last block group handling bug in ext2fs_check_desc(), but I didn't see any other bugs that this patch would actually affect. Am I missing anything?

Regards,

- Ted

#6 lore raw
Quoted 11 lines · Theodore Tso
Quoted 3 lines · Eric Sandeen

new patchset & series is at

http://people.redhat.com/esandeen/ext3/e2fsprogs-1.39-16T/e2fsprogs-hg-20060830-16T-patches.tar.gz

I've applied your patches (with a few minor changes in the ChangeLogs), and committed them into Mercurial.

Regards,

- Ted

Thanks Ted!

There's one more lurking out there that I somehow neglected to put in the above patchset, sent 08/16/2006, [Ext2-devel] [PATCH] fix size calculation when mkfs is pointed at a regular file

http://article.gmane.org/gmane.comp.file-systems.ext2.devel/4703

Thanks,

-Eric