From: Theodore Tso <tytso@mit.edu>
To: number9652 <number9652@yahoo.com>
Cc: Eric Sandeen <sandeen@redhat.com>,
ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] libext2fs: write only core inode in update_path()
Date: Wed, 17 Jun 2009 18:46:42 -0400 [thread overview]
Message-ID: <20090617224642.GD7867@mit.edu> (raw)
In-Reply-To: <429929.18438.qm@web43515.mail.sp1.yahoo.com>
On Wed, Jun 17, 2009 at 02:32:18PM -0700, number9652 wrote:
> I was too general in my statement above about what it broke. I think (didn't test) if a program follows this path:
> extent_open(...,*handle)
> write_inode_full(...,handle->inode,...)
> that it will read uninitialized memory in write_inode_full. It
>seems clear that all previously written code assumes that this path
>is valid, and fixing all that to not assume that would seemingly be
>much more than just what your patch fixes and require more time to
>test. If you only use read/write_inode_full, everything is still
>okay.
Um, but that can't happen; the ext2_extent_handle_t type is an opaque
type. So outside of code in lib/ext2fs/extent.c, no one else can see
the inode in the ext2_handle_t.
The safest thing to do is to simply make the extent code only use
ext2_write_inode and ext2_read_inode. Otherwise, we have to worry
about a user passing in the smaller 128-byte inode form. The extent
code doesn't need any of the extended inode fields, so this is
completely safe.
- Ted
next prev parent reply other threads:[~2009-06-17 22:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 21:32 [PATCH] libext2fs: write only core inode in update_path() number9652
2009-06-17 21:36 ` Eric Sandeen
2009-06-17 22:46 ` Theodore Tso [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-06-17 20:11 number9652
2009-06-17 20:43 ` Eric Sandeen
2009-06-16 22:38 Something wrong with extent-based journal creation Eric Sandeen
2009-06-17 0:57 ` [PATCH] libext2fs: write only core inode in update_path() Eric Sandeen
2009-06-17 15:35 ` Theodore Tso
2009-06-17 15:50 ` Eric Sandeen
2009-06-17 22:50 ` Theodore Tso
2009-06-17 23:00 ` Eric Sandeen
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=20090617224642.GD7867@mit.edu \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=number9652@yahoo.com \
--cc=sandeen@redhat.com \
/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).