[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080618022712.GB1383@brong.net>
Date: Wed, 18 Jun 2008 12:27:12 +1000
From: Bron Gondwana <brong@...tmail.fm>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Bron Gondwana <brong@...tmail.fm>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Nick Piggin <npiggin@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Rob Mueller <robm@...tmail.fm>,
Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386,
bisected, reproducable)
On Tue, Jun 17, 2008 at 02:20:49PM -0700, Linus Torvalds wrote:
>
>
> 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.
>
> 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.
I have a real world test case using "cyr_dbtool" from Cyrus 2.3.12 on a
known-bug-inducing piece of data (the key and value sizes in the example
code were taken from that. Indeed, the example code started off
building byte-for-byte identical files, then I changed it to write only
a single character across the entire key and value so the hexdump was
shorter)
I'll give it a go.
Bron.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists