linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Phillip Susi <psusi@ubuntu.com>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] e2fslibs: fix llseek on i386
Date: Fri, 25 Jan 2013 10:25:14 +0800	[thread overview]
Message-ID: <20130125022514.GA10883@gmail.com> (raw)
In-Reply-To: <20130124203230.GA20776@thunk.org>

On Thu, Jan 24, 2013 at 03:32:30PM -0500, Theodore Ts'o wrote:
> On Thu, Jan 24, 2013 at 03:22:37PM -0500, Phillip Susi wrote:
> > 
> > On 1/24/2013 2:51 PM, Theodore Ts'o wrote:
> > > How did you find this?  I've done a quick search for SEEK_CUR, and
> > > it looks like only place where this could cause a problem is with 
> > > e2image.  And a quick test of a i386 version of e2image with a
> > > large file system is that it does indeed blow up with an
> > > "Inappropriate ioctl for device" error.
> > 
> > That's where I found it, but the error should be "seek: Value too
> > large for defined data type"
> 
> Well, I did my testing using an i386 debian/testing chroot running
> under a x86-64 3.8.0-rc3 kernel.  I'm guessing it was the use of a
> 32-bit userspace / 64-bit kernel that probably explains the
> difference.
> 
> > > Is there any other potential problems that are caused by this bug?
> > > I like to explain the impacts of bug fixes in libext2fs for folks
> > > who are doing bug fix / code archeology.
> > 
> > If e2image is the only internal user of the call with SEEK_CUR, then I
> > guess it only affects any external users of the library who were doing
> > this ( I am not aware of any ).
> 
> Well, there are some binaries that aren't usually built by most
> distributions (make-sparse and copy-sparse), but in terms of primary
> e2fsprogs programs (mke2fs, e2fskc, tune2fs, chattr, lsattr, etc.)
> nope, none of them use SEEK_CUR.
> 
> The lib/ext2fs/fileio.c file does use SEEK_CUR, which means it might
> impact 3rd party packages such as e2tools and ext2fuse (although
> that's generally only used on Mac and Windows systems).

Hi Ted,

This patch makes me consider my patches that dump a sparse file in
debugfs.  In my patch [1] llseek64(2) is called to seek to the next
data in target file.  So I believe ext2fs_llseek() is a better choice.
I am happy to send a newer patch to fix it.  What do you think?

1. http://www.spinics.net/lists/linux-ext4/msg36134.html

Thanks,
                                                - Zheng

  reply	other threads:[~2013-01-25  2:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24 16:21 [PATCH] e2fslibs: fix llseek on i386 Phillip Susi
2013-01-24 19:51 ` Theodore Ts'o
2013-01-24 20:22   ` Phillip Susi
2013-01-24 20:32     ` Theodore Ts'o
2013-01-25  2:25       ` Zheng Liu [this message]
2013-01-25  2:16         ` Theodore Ts'o
2013-01-25  2:48           ` Zheng Liu
2013-01-25  4:13 ` Theodore Ts'o
2013-01-25  4:14   ` [PATCH] libext2fs: fix ext2fs_llseek " Theodore Ts'o
2013-01-25  4:34     ` Phillip Susi

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=20130125022514.GA10883@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=psusi@ubuntu.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).