public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Bron Gondwana <brong@fastmail.fm>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Nick Piggin <npiggin@suse.de>, Rob Mueller <robm@fastmail.fm>,
	Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
	stable@kernel.org
Subject: Re: BUG: mmapfile/writev spurious zero bytes still in the wild
Date: Fri, 3 Oct 2008 06:07:23 -0700	[thread overview]
Message-ID: <20081003060723.7184a1ed.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081003114414.GA14390@brong.net>

On Fri, 3 Oct 2008 21:44:14 +1000 Bron Gondwana <brong@fastmail.fm> wrote:

> On Tue, Jun 17, 2008 at 02:20:49PM -0700, Linus Torvalds wrote:
> 
> [reminder from way back: this bug was caused by writev containing 
> mmaped pages that weren't paged in, it's 64 bit only.  It
> particularly affects Cyrus Imapd's database formats]
> 
> > On Tue, 17 Jun 2008, Linus Torvalds wrote:
> > > 
> > > Hmm. Something like this *may* salvage it.
> > > 
> > > Untested, so far (I'll reboot and test soon enough), but even if it fixes 
> > > things, it's not really very good. 
> > 
> > Ok, so I just rebooted with this, and it does indeed fix the bug.
> > 
> > I'd be happier with a more complete fix (ie being byte-accurate and 
> > actually doing the partial copy when it hits a fault in the middle), but 
> > this seems to be the minimal fix, and at least fixes the totally bogus 
> > return values from the x86-64 __copy_user*() functions.
> 
> Has this been revisited since?  I haven't noticed, but I really only
> skim LKML - have to save some time in the day for my real job[tm] of
> keeping an email service running!
> 
> > Not that I checked that I got _all_ cases correct (and maybe there are 
> > other versions of __copy_user that I missed entirely), but Bron's 
> > test-case at least seems to work properly for me now.
> > 
> > Bron? If you have a more complete test-suite (ie the real-world case that 
> > made you find this), it would be good to verify the whole thing. 
> 
> It's been fine for us since, but unfortunately most of the world is
> still running distribution "stable" kernels.  I've just been helping a
> user who's getting corrupted flat file databases on Ubuntu's stable 64
> bit xen kernels, and it looks like it's the same issue.
> 
> Is there a standard way to tell backporters "you really need to add this
> patch for your users' sanity"?

Yes, there is.  We backport the patch into earlier kernel releases and
that action _should_ wake the distros up to take a look at the fix.

This particular fix (42a886af728c089df8da1b0017b0e7e6c81b5335) was
included in 2.6.26 and also is present in 2.6.25.17, but not 2.6.25. 
So we did backport it into 2.6.25.x.  Maybe distros were slow or errant
in picking up the patch.


  reply	other threads:[~2008-10-03 13:08 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17  6:00 BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) Bron Gondwana
2008-06-17  6:02 ` Bron Gondwana
2008-06-17 17:08   ` Linus Torvalds
2008-06-17 17:45     ` Linus Torvalds
2008-06-17 20:16       ` Linus Torvalds
2008-06-17 20:41         ` Linus Torvalds
2008-06-17 21:06           ` Linus Torvalds
2008-06-17 21:16             ` Andi Kleen
2008-06-17 21:24               ` Linus Torvalds
2008-06-17 21:30                 ` Andi Kleen
2008-06-17 21:37                   ` Linus Torvalds
2008-06-17 21:36                 ` Al Viro
2008-06-17 21:42                   ` Andi Kleen
2008-06-17 21:49                     ` Linus Torvalds
2008-06-17 22:11                     ` Al Viro
2008-06-17 22:21                       ` Andi Kleen
2008-06-18  6:22                         ` Nick Piggin
2008-06-17 21:20             ` Linus Torvalds
2008-06-18  2:27               ` Bron Gondwana
2008-06-18  3:14               ` Bron Gondwana
2008-06-18  4:03                 ` Linus Torvalds
2008-06-18  5:11                   ` Cyrus mmap vs lseek/write usage - (WAS: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable)) Bron Gondwana
2008-06-18 16:22                     ` Linus Torvalds
2008-06-18 23:45                       ` Robert Mueller
2008-06-19  0:20                         ` Linus Torvalds
2008-10-03 11:44               ` BUG: mmapfile/writev spurious zero bytes still in the wild Bron Gondwana
2008-10-03 13:07                 ` Andrew Morton [this message]
2008-10-04  0:13                   ` Bron Gondwana
2008-06-17 21:15           ` BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) Andi Kleen
2008-06-17 20:58         ` Andi Kleen
2008-06-17 21:14           ` Linus Torvalds
2008-06-17 21:26             ` Andi Kleen
2008-06-17 21:31               ` Linus Torvalds
2008-06-17 21:34                 ` Linus Torvalds
2008-06-17 21:34                 ` Andi Kleen
2008-06-17 21:46                   ` Linus Torvalds
2008-06-18  6:10                     ` Nick Piggin
2008-06-18  2:21     ` Bron Gondwana

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=20081003060723.7184a1ed.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=brong@fastmail.fm \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=robm@fastmail.fm \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.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