From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] libext2fs: add missing swab for superblock, add checks
Date: Wed, 13 Dec 2017 22:41:21 -0500 [thread overview]
Message-ID: <20171214034121.bmusgiypnn6iu77d@thunk.org> (raw)
In-Reply-To: <1513208834-37777-1-git-send-email-adilger@dilger.ca>
On Wed, Dec 13, 2017 at 04:47:14PM -0700, Andreas Dilger wrote:
> Several recently-added fields in struct ext2_super_block were
> not being swabbed in ext2fs_swap_super(), in particular:
>
> s_raid_stride, s_raid_stripe_width, s_{first,last}_error_*
> s_lpf_ino, s_prj_quota_inum
>
> Add swabbing for these missing fields. Reorder the swabbing
> on other fields so that they are in struct order, and add
> comments for fields that do not need swabbing, so it is easier
> to see that all fields are being handled.
>
> Since this seems to be a fairly common occurrence, add compile
> time checks to ext2fs_swap_super(), ext2fs_swap_inode_large(),
> and ext2fs_swap_group_desc2() via a new EXT2FS_BUILD_BUG_ON()
> macro to cause a compile warning if fields are used from these
> structs without a corresponding change to the swab functions.
>
> Lustre-bug: https://jira.hpdd.intel.com/browse/LU-9309
> Reported-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
> Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Applied, thanks.
- Ted
prev parent reply other threads:[~2017-12-14 3:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 23:47 [PATCH] libext2fs: add missing swab for superblock, add checks Andreas Dilger
2017-12-14 3:41 ` Theodore Ts'o [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171214034121.bmusgiypnn6iu77d@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).