All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carsten Otte <cotte@de.ibm.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	borntrae@linux.vnet.ibm.com, Jared Hulbert <jaredeh@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Hugh Dickins <hugh@veritas.com>
Subject: Re: [patch] mm: xip fix fault vs sparse page invalidate race
Date: Mon, 18 Aug 2008 12:50:40 +0200	[thread overview]
Message-ID: <48A95400.5050003@de.ibm.com> (raw)
In-Reply-To: <20080818054409.GB3011@wotan.suse.de>

Nick Piggin wrote:
> XIP has a race between sparse pages being inserted into page tables, and
> sparse pages being zapped when its time to put a non-sparse page in.
> 
> What can happen is that a process can be left with a dangling sparse page
> in a MAP_SHARED mapping, while the rest of the world sees the non-sparse
> version. Ie. data corruption. 
> 
> Guard these operations with a seqlock, making fault-in-sparse-pages
> the slowpath, and try-to-unmap-sparse-pages the fastpath.
> 
> Signed-off-by: Nick Piggin <npiggin@suse.de>
Ouch.
Acked-by: Carsten Otte <cotte@de.ibm.com>

WARNING: multiple messages have this Message-ID (diff)
From: Carsten Otte <cotte@de.ibm.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	borntrae@linux.vnet.ibm.com, Jared Hulbert <jaredeh@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Hugh Dickins <hugh@veritas.com>
Subject: Re: [patch] mm: xip fix fault vs sparse page invalidate race
Date: Mon, 18 Aug 2008 12:50:40 +0200	[thread overview]
Message-ID: <48A95400.5050003@de.ibm.com> (raw)
In-Reply-To: <20080818054409.GB3011@wotan.suse.de>

Nick Piggin wrote:
> XIP has a race between sparse pages being inserted into page tables, and
> sparse pages being zapped when its time to put a non-sparse page in.
> 
> What can happen is that a process can be left with a dangling sparse page
> in a MAP_SHARED mapping, while the rest of the world sees the non-sparse
> version. Ie. data corruption. 
> 
> Guard these operations with a seqlock, making fault-in-sparse-pages
> the slowpath, and try-to-unmap-sparse-pages the fastpath.
> 
> Signed-off-by: Nick Piggin <npiggin@suse.de>
Ouch.
Acked-by: Carsten Otte <cotte@de.ibm.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-08-18 10:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18  5:38 [patch] mm: dirty page tracking race fix Nick Piggin
2008-08-18  5:38 ` Nick Piggin
2008-08-18  5:44 ` [patch] mm: xip fix fault vs sparse page invalidate race Nick Piggin
2008-08-18  5:44   ` Nick Piggin
2008-08-18  6:03   ` [patch] mm: xip/ext2 fix block allocation race Nick Piggin
2008-08-18  6:03     ` Nick Piggin
2008-08-18 10:51     ` Carsten Otte
2008-08-18 10:51       ` Carsten Otte
2008-08-18 10:50   ` Carsten Otte [this message]
2008-08-18 10:50     ` [patch] mm: xip fix fault vs sparse page invalidate race Carsten Otte
2008-08-18  7:49 ` [patch] mm: dirty page tracking race fix Peter Zijlstra
2008-08-18  7:49   ` Peter Zijlstra
2008-08-18  8:03   ` Nick Piggin
2008-08-18  8:03     ` Nick Piggin
2008-08-18  8:07     ` Peter Zijlstra
2008-08-18  8:07       ` Peter Zijlstra
2008-08-18  8:12       ` Nick Piggin
2008-08-18  8:12         ` Nick Piggin
2008-08-19  9:11 ` Andrew Morton
2008-08-19  9:11   ` Andrew Morton
2008-08-19 10:19   ` Nick Piggin
2008-08-19 10:19     ` Nick Piggin

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=48A95400.5050003@de.ibm.com \
    --to=cotte@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=borntrae@linux.vnet.ibm.com \
    --cc=carsteno@de.ibm.com \
    --cc=hugh@veritas.com \
    --cc=jaredeh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.