LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
rob@landley.net, Jens Axboe <axboe@kernel.dk>,
cotte@de.ibm.com
Subject: Re: [patch] mm: fix XIP file writes
Date: Wed, 12 Dec 2007 05:03:28 +0100 [thread overview]
Message-ID: <20071212040328.GA23914@wotan.suse.de> (raw)
In-Reply-To: <200712101538.20619.borntraeger@de.ibm.com>
On Mon, Dec 10, 2007 at 03:38:20PM +0100, Christian Borntraeger wrote:
> Hi Nick,
>
> > Here we go. See, brd already found a bug ;)
> > Can you apply the ext2 XIP patch too? And I'll resend the brd XIP patch.
> [...]
> > Writing to XIP files at a non-page-aligned offset results in data corruption
> > because the writes were always sent to the start of the page.
> [...]
> > @@ -314,7 +314,7 @@ __xip_file_write(struct file *filp, cons
> > fault_in_pages_readable(buf, bytes);
> > kaddr = kmap_atomic(page, KM_USER0);
> > copied = bytes -
> > - __copy_from_user_inatomic_nocache(kaddr, buf, bytes);
> > + __copy_from_user_inatomic_nocache(kaddr + offset, buf, bytes);
> > kunmap_atomic(kaddr, KM_USER0);
> > flush_dcache_page(page);
>
> I asked myself why this problem never happened before. So I asked our testers
> to reproduce this problem on 2.6.23 and service levels. As the testcase did
> not trigger, I looked into the 2.6.23 code. This problem was introduced by
> commit 4a9e5ef1f4f15205e477817a5cefc34bd3f65f55 (mm: write iovec cleanup from
> Nick Piggin) during 2.6.24-rc:
> --------snip-------
> - copied = filemap_copy_from_user(page, offset, buf, bytes);
> [...]
> + copied = bytes -
> + __copy_from_user_inatomic_nocache(kaddr, buf, bytes);
> -------------------
>
> So yes, its good to have xip on brd. It even tests your changes ;-)
> Good news is, that we dont need anything for stable.
Heh ;) that explains a lot. Thanks!
next prev parent reply other threads:[~2007-12-12 4:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-04 4:26 [patch] rewrite rd Nick Piggin
2007-12-04 6:29 ` Andrew Morton
2007-12-04 7:01 ` Nick Piggin
2007-12-04 7:08 ` Nick Piggin
2007-12-04 7:55 ` Rob Landley
2007-12-04 9:29 ` Nick Piggin
2007-12-04 19:53 ` Rob Landley
2007-12-04 9:54 ` Christian Borntraeger
2007-12-04 10:10 ` Nick Piggin
2007-12-04 11:21 ` [patch] rd: support XIP Nick Piggin
2007-12-04 11:23 ` [patch] ext2: xip check fix Nick Piggin
2007-12-05 15:43 ` Carsten Otte
2007-12-05 23:33 ` Nick Piggin
2007-12-06 8:43 ` Carsten Otte
2007-12-06 8:52 ` Nick Piggin
2007-12-06 9:59 ` Carsten Otte
2007-12-06 10:18 ` Nick Piggin
2007-12-06 10:24 ` Carsten Otte
2007-12-06 18:11 ` Rob Landley
2007-12-07 3:22 ` Jared Hulbert
2007-12-07 4:17 ` Rob Landley
2007-12-07 4:23 ` Nick Piggin
2007-12-07 4:40 ` Jared Hulbert
2007-12-07 8:59 ` Carsten Otte
2007-12-07 9:52 ` Jared Hulbert
2007-12-04 11:26 ` [patch] rd: support XIP Andrew Morton
2007-12-04 11:35 ` Nick Piggin
2007-12-04 13:00 ` [patch] mm: fix XIP file writes Nick Piggin
2007-12-10 14:38 ` Christian Borntraeger
2007-12-12 4:03 ` Nick Piggin [this message]
2007-12-04 12:06 ` [patch] rd: support XIP Duane Griffin
2007-12-04 13:03 ` [patch] rd: support XIP (updated) Nick Piggin
2008-01-14 16:47 ` [patch] rewrite rd Matthew Wilcox
2008-01-14 17:21 ` Jens Axboe
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=20071212040328.GA23914@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=borntraeger@de.ibm.com \
--cc=cotte@de.ibm.com \
--cc=ebiederm@xmission.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--subject='Re: [patch] mm: fix XIP file writes' \
/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
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).