From: Andreas Dilger <adilger@sun.com>
To: Nick Dokos <nicholas.dokos@hp.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
linux-ext4@vger.kernel.org, Eric Sandeen <sandeen@redhat.com>,
Justin Maggard <jmaggard10@gmail.com>,
Ric Wheeler <rwheeler@redhat.com>
Subject: Re: [PATCH] Fix ext2fs_set_gdt_csum() to use access functions.
Date: Wed, 02 Sep 2009 23:21:03 -0600 [thread overview]
Message-ID: <20090903052103.GM4197@webber.adilger.int> (raw)
In-Reply-To: <12386.1251948115@gamaville.dokosmarshall.org>
On Sep 02, 2009 23:21 -0400, Nick Dokos wrote:
> Replace all field accesses with calls to access functions.
> Most importantly, get rid of the mis-declared group descriptor
> pointer which caused the wrong fields to be updated.
>
> errcode_t ext2fs_set_gdt_csum(ext2_filsys fs)
> {
> struct ext2_super_block *sb = fs->super;
> - struct ext2_group_desc *bg = fs->group_desc;
Given the danger of ongoing direct access to fs->group_desc (including
potentially from external applications) I think the only safe way of
doing this is to have an opaque fs->group_desc structure that cannot
be dereferenced outside of the library.
As a potential compatibility measure, we might consider fs->group_desc
to be valid for 32-bit filesystems, and leave it NULL for 64-bit
filesystems and use a second (opaque) fs->group_desc64 pointer for
access to filesystems with INCOMPAT_64BIT set.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
next prev parent reply other threads:[~2009-09-03 5:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 3:21 [PATCH] Fix ext2fs_set_gdt_csum() to use access functions Nick Dokos
2009-09-03 4:51 ` Eric Sandeen
2009-09-03 5:11 ` Nick Dokos
2009-09-03 5:12 ` Eric Sandeen
2009-09-03 18:16 ` Justin Maggard
2009-09-03 5:21 ` Andreas Dilger [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-09-03 5:22 Nick Dokos
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=20090903052103.GM4197@webber.adilger.int \
--to=adilger@sun.com \
--cc=jmaggard10@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=nicholas.dokos@hp.com \
--cc=rwheeler@redhat.com \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/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).