Skip to content

RFC: (partially) endian-annotate e2fsprogs

Eric Sandeen linux-ext4 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6e2fsprogs: define bitwise types and annotate conversion routinese2fsck/jfs_user.h lib/blkid/blkid_types.h.in lib/ext2fs/bitops.h +2 more+56 -320 replies
2/6e2fsprogs: fix endian handling of ext3_extent_headerlib/ext2fs/ext3_extents.h lib/ext2fs/inline_data.c+11 -61 reply
3/6e2fsprogs: Endian-annotate most on-disk structureslib/ext2fs/ext2_fs.h lib/ext2fs/ext3_extents.h lib/ext2fs/kernel-jbd.h +3 more+48 -470 replies
4/6debugfs: don't swap htree nodes in-placedebugfs/htree.c+18 -170 replies
5/6libext2: minor sparse endian checker fixuplib/ext2fs/extent.c+4 -20 replies
6/6quotaio: annotate & fix up for sparse endian checkerlib/quota/quotaio_tree.c lib/quota/quotaio_v2.c+9 -80 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchDarrick J. Wong
1/6
2/6R-b
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] RFC: (partially) endian-annotate e2fsprogs

This is really only partial, and in the end didn't spot any actual problems. And things are a bit odd and tricky, because some structures (superblocks, inodes, etc) are swapped in-place in the same structure (so they can't be easily annotated - if we wish to, we should define separate on-disk and in-memory structures).

Further, i_block in the inode is sometimes swapped on read, and sometimes not (!), depending on whether it's indirect blocks, extents, or inline data. So that's still messy too.

So this is really just kind of an RFC; I did it on a whim, and things aren't yet totally sparse-check clean, but figured I'd send it out and see what people think, whether it's worth merging, or working on cleaning up the above issues to make it all tidier.

(sparse is pretty good at looking for casts in and out of blk64_t too, though I haven't looked much at those.)

Thanks,
-Eric