public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/3] xfs: truncate readdir offsets to signed 32 bit values
Date: Fri, 9 Jan 2009 09:43:50 +1100	[thread overview]
Message-ID: <20090108224350.GJ9448@disturbed> (raw)
In-Reply-To: <20090108190000.GA8440@infradead.org>

On Thu, Jan 08, 2009 at 02:00:00PM -0500, Christoph Hellwig wrote:
> On Thu, Jan 08, 2009 at 01:42:24PM -0500, Christoph Hellwig wrote:
> > John Stanley reported EOVERFLOW errors in readdir from his self-build
> > glibc.  I traced this down to glibc enabling d_off overflow checks
> > in one of the about five million different getdents implementations.
> > 
> > In 2.6.28 Dave Woodhouse moved our readdir double buffering required
> > for NFS4 readdirplus into nfsd and at that point we lost the capping
> > of the directory offsets to 32 bit signed values.  Johns glibc used
> > getdents64 to even implement readdir for normal 32 bit offset dirents,
> > and failed with EOVERFLOW only if this happens on the first dirent in
> > a getdents call.  I managed to come up with a testcase that uses
> > raw getdents and does the EOVERFLOW check manually.  We always hit
> > it with our last entry due to the special end of directory marker.
> > 
> > The patch below is a dumb version of just putting back the masking,
> > to make sure we have the same behavior as in 2.6.27 and earlier.
> > 
> > I will work on a better and cleaner fix for 2.6.30.
> > 
> > Reported-by: John Stanley <jpsinthemix@verizon.net>
> > Tested-by: John Stanley <jpsinthemix@verizon.net>
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> As arkem noticed I should not have sent out some half-mangled version
> but the first crude patch.  Here it is:

Reviewed-by: Dave Chinner <david@fromorbit.com>

-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-01-08 22:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08 18:42 [PATCH 0/3] regression fixes for 2.6.29 Christoph Hellwig
2009-01-08 18:42 ` [PATCH 1/3] xfs: fix compile of xfs_btree_readahead_lblock on m68k Christoph Hellwig
2009-01-08 22:42   ` Dave Chinner
2009-01-08 18:42 ` [PATCH 2/3] xfs: truncate readdir offsets to signed 32 bit values Christoph Hellwig
2009-01-08 19:00   ` Christoph Hellwig
2009-01-08 22:43     ` Dave Chinner [this message]
2009-01-08 18:42 ` [PATCH 3/3] xfs: make xfs_ino_t an unsigned long long Christoph Hellwig
2009-01-08 22:44   ` Dave Chinner

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=20090108224350.GJ9448@disturbed \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.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