linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Benjamin C.R. LaHaise" <blah@kvack.org>
To: Erik Corry <erik@arbat.com>
Cc: Kanoj Sarcar <kanoj@google.engr.sgi.com>,
	ak-uu@muc.de, linux-mm@kvack.org
Subject: Re: Assumed Failure rates in Various o.s's ?
Date: Fri, 21 May 1999 12:02:07 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.3.95.990521114528.18804A-100000@as200.spellcast.com> (raw)
In-Reply-To: <19990521165432.A13600@arbat.com>

On Fri, 21 May 1999, Erik Corry wrote:

> Actually, isn't it just munmap that is problematic?
> 
> After the access_ok you can't map a read-only file into the
> path of an oncoming copy_to_user without first unmapping
> what was there before (this is assuming a version of
> access_ok that checks whether something was mapped).
> So mmaps can safely happen in parallel with copy_to_user.

Both mmap and munmap are safe -- the i386 bug is that writes to read-only
pages succeed while in the kernel.  Mmap needs to lock the vma during
initialization in case the driver has to sleep.  To avoid the bug, we just
need to protect against making any pages readonly in the vma after the vma
is in a safe state: fork, read mappings of non-present pages, swapout --
just about anything that can modify the page table can put a read only
page.

		-ben

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

  reply	other threads:[~1999-05-21 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199905191428.QAA1295681@beryllium.daimi.au.dk>
1999-05-19 17:37 ` Kanoj Sarcar
1999-05-21 10:07   ` Erik Corry
1999-05-21 14:25     ` Benjamin C.R. LaHaise
1999-05-21 14:54       ` Erik Corry
1999-05-21 16:02         ` Benjamin C.R. LaHaise [this message]
1999-05-21 17:06       ` Kanoj Sarcar
1999-05-21 17:23     ` Kanoj Sarcar

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=Pine.LNX.3.95.990521114528.18804A-100000@as200.spellcast.com \
    --to=blah@kvack.org \
    --cc=ak-uu@muc.de \
    --cc=erik@arbat.com \
    --cc=kanoj@google.engr.sgi.com \
    --cc=linux-mm@kvack.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