mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] restore protections after forced fault in get_user_pages
Date: Mon, 2 Feb 2004 16:03:19 -0800	[thread overview]
Message-ID: <200402030003.i1303JQE016298@magilla.sf.frob.com> (raw)
In-Reply-To: Linus Torvalds's message of  Monday, 2 February 2004 15:55:51 -0800 <Pine.LNX.4.58.0402021551320.9720@home.osdl.org>

> That should be sufficient, I think: since "handle_mm_fault()" marks the 
> page dirty (but not writable) and will have done all the work to do a COW, 
> we know that once we do the "follow_page()", we'll be getting a private 
> copy. Which is what we wanted.

The only potential hole I can see here is if there is an (exceedingly rare)
race where the page could be ejected after handle_mm_fault, then brought
back in but not marked dirty, before follow_page looks it up and returns a
page to be used for writing without marking it dirty.  Obviously this is a
ridiculously unlikely case.  But what I don't know is whether it is
strictly speaking impossible.  That is, that a page once dirty then later
not present, would ever again be present without also being dirty.


Thanks,
Roland

  reply	other threads:[~2004-02-03  0:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-02  7:29 Roland McGrath
2004-02-02 22:46 ` Andrew Morton
2004-02-02 23:09   ` Linus Torvalds
2004-02-02 23:48   ` Roland McGrath
2004-02-02 23:55     ` Linus Torvalds
2004-02-03  0:03       ` Roland McGrath [this message]
2004-02-03  0:09       ` Roland McGrath
2004-02-03  0:30         ` Linus Torvalds
2004-02-03  0:42           ` Andrew Morton
2004-02-03  0:55           ` Roland McGrath
2004-02-03  8:29           ` Ingo Molnar
2004-02-03 10:25           ` Roland McGrath
2004-02-03 17:04             ` Linus Torvalds

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=200402030003.i1303JQE016298@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®